home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / OCEAuthDir.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  183.4 KB  |  4,709 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        OCEAuthDir.h
  3.  
  4.      Contains:    Apple Open Collaboration Environment Authentication Interfaces.
  5.  
  6.      Version:    Technology:    AOCE Toolbox 1.02
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1994-1999 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __OCEAUTHDIR__
  18. #define __OCEAUTHDIR__
  19.  
  20. #ifndef __APPLETALK__
  21.     #include <AppleTalk.h>
  22. #endif
  23.  
  24. #ifndef __FILES__
  25.     #include <Files.h>
  26. #endif
  27.  
  28. #ifndef __OSUTILS__
  29.     #include <OSUtils.h>
  30. #endif
  31.  
  32. #ifndef __MACTYPES__
  33.     #include <MacTypes.h>
  34. #endif
  35.  
  36.  
  37. #ifndef __OCE__
  38.     #include <OCE.h>
  39. #endif
  40.  
  41.  
  42.  
  43.  
  44. #if PRAGMA_ONCE
  45. #pragma once
  46. #endif
  47.  
  48. #ifdef __cplusplus
  49. extern "C" {
  50. #endif
  51.  
  52. #if PRAGMA_IMPORT
  53. #pragma import on
  54. #endif
  55.  
  56. #if PRAGMA_STRUCT_ALIGN
  57.     #pragma options align=mac68k
  58. #elif PRAGMA_STRUCT_PACKPUSH
  59.     #pragma pack(push, 2)
  60. #elif PRAGMA_STRUCT_PACK
  61.     #pragma pack(2)
  62. #endif
  63.  
  64. /*****************************************************************************/
  65. enum {
  66.     kRC4KeySizeInBytes            = 8,                            /* size of an RC4 key */
  67.     kRefNumUnknown                = 0
  68. };
  69.  
  70. enum {
  71.     kEnumDistinguishedNameBit    = 0,
  72.     kEnumAliasBit                = 1,
  73.     kEnumPseudonymBit            = 2,
  74.     kEnumDNodeBit                = 3,
  75.     kEnumInvisibleBit            = 4
  76. };
  77.  
  78. /* Values of DirEnumChoices */
  79. enum {
  80.     kEnumDistinguishedNameMask    = 1L << kEnumDistinguishedNameBit,
  81.     kEnumAliasMask                = 1L << kEnumAliasBit,
  82.     kEnumPseudonymMask            = 1L << kEnumPseudonymBit,
  83.     kEnumDNodeMask                = 1L << kEnumDNodeBit,
  84.     kEnumInvisibleMask            = 1L << kEnumInvisibleBit,
  85.     kEnumAllMask                = (kEnumDistinguishedNameMask | kEnumAliasMask | kEnumPseudonymMask | kEnumDNodeMask | kEnumInvisibleMask)
  86. };
  87.  
  88. typedef unsigned long                     DirEnumChoices;
  89. /* Values of DirSortOption */
  90. enum {
  91.     kSortByName                    = 0,
  92.     kSortByType                    = 1
  93. };
  94.  
  95.  
  96. /* Values of DirSortDirection */
  97. enum {
  98.     kSortForwards                = 0,
  99.     kSortBackwards                = 1
  100. };
  101.  
  102. /* Values of DirMatchWith */
  103. enum {
  104.     kMatchAll                    = 0,
  105.     kExactMatch                    = 1,
  106.     kBeginsWith                    = 2,
  107.     kEndingWith                    = 3,
  108.     kContaining                    = 4
  109. };
  110.  
  111. typedef UInt8                             DirMatchWith;
  112. enum {
  113.     kCurrentOCESortVersion        = 1
  114. };
  115.  
  116. /*  Access controls are implemented on three levels:
  117.  *      DNode, Record, and Attribute Type levels
  118.  *  Some access control bits apply to the container itself, and some apply to its contents.
  119.  *
  120.  *  The Catalog Toolbox supports six functions.  These calls are:
  121.  *  DSGetDNodeAccessControl : to get Access Controls at the DNode level
  122.  *    DSGetRecordAccessControl  : to get Access Controls at the record level
  123.  *  DSGetAttributeAccessControl : to get Access Privileges at the attribute type level
  124.  * 
  125.  *  The GetXXXAccessControl calls will return access control masks for various categories
  126.  *  of users.  Please refer to the access control document for a description of the
  127.  *  categories of users.  In general these are:
  128.  *      ThisRecordOwner         - means the identity of the record itself
  129.  *      Friends                  - means any one of the assigned friends for the record
  130.  *      AuthenticatedInDNode     - means any valid user that is an authenticated entity
  131.  *          in the DNode in which this record is located
  132.  *      AuthenticatedInDirectory - means any valid authenticated catalog user
  133.  *      Guest                      - means an unauthenticated user.
  134.  *  Bit masks for various permitted access controls are defined below.
  135.  *
  136.  *  GetXXXAccessControl calls will return access control masks for various categories of
  137.  *  users for this record. In addition they also return the level of access controls
  138.  *  that the user (who is making the GetXXXAccessControl call) has for the DNode,
  139.  *  record, or attribute type.
  140.  *
  141.  *  For records, the access control granted will be minimum of the DNode access
  142.  *  control and record access control masks.  For example, to add an attribute type to a
  143.  *  record, a user must have access control kCreateAttributeTypes at the record and
  144.  *  DNode levels.  Similarly, at the attribute type level, access controls will be the
  145.  *  minimum of the DNode, record, and attribute type access controls.
  146.  *
  147.  *  
  148.  */
  149. /* access privileges bit numbers */
  150. enum {
  151.     kSeeBit                        = 0,
  152.     kAddBit                        = 1,
  153.     kDeleteBit                    = 2,
  154.     kChangeBit                    = 3,
  155.     kRenameBit                    = 4,
  156.     kChangePrivsBit                = 5,
  157.     kSeeFoldersBit                = 6
  158. };
  159.  
  160. /* Values of AccessMask */
  161. enum {
  162.     kSeeMask                    = (1L << kSeeBit),
  163.     kAddMask                    = (1L << kAddBit),
  164.     kDeleteMask                    = (1L << kDeleteBit),
  165.     kChangeMask                    = (1L << kChangeBit),
  166.     kRenameMask                    = (1L << kRenameBit),
  167.     kChangePrivsMask            = (1L << kChangePrivsBit),
  168.     kSeeFoldersMask                = (1L << kSeeFoldersBit)
  169. };
  170.  
  171. enum {
  172.     kAllPrivs                    = (kSeeMask + kAddMask + kDeleteMask + kChangeMask + kRenameMask + kChangePrivsMask + kSeeFoldersMask),
  173.     kNoPrivs                    = 0
  174. };
  175.  
  176. /*
  177.  
  178. kSupportsDNodeNumberBit:
  179. If this bit is set, a DNode can be referenced using DNodeNumbers. 
  180. RecordLocationInfo can be specified using DNodeNumber and PathName component can be nil. 
  181. If this bit is not set, a DNode can be referenced only by PathName to the DNode. In the 
  182. later case DNodeNumber component inside record location info must be set to zero.
  183.  
  184. kSupportsRecordCreationIDBit:
  185. If this bit is set, a record can be referenced by specifying CreationID 
  186. in most catalog manager calls. If this bit is not set recordName and recordType are 
  187. required in the recordID specification for all catalog manager calls.
  188.  
  189. kSupportsAttributeCreationIDBit:
  190. If this bit is set, an attribute value can be obtained by specifying it's 
  191. CreationID in Lookup call staring point and also can be used in operations 
  192. like DeleteAttributeValue and ChangeAttributeValue an Attribute can be 
  193. specified by AttributeType and CreationID.
  194.  
  195. *************************************************************************
  196. Implicit assumption with creationID's and dNodeNumbers are, when supported
  197. they are persistent and will preserved across boots and life of the system.
  198. *************************************************************************
  199.  
  200. Following three bits are for determining the sort order in enumeration.
  201. kSupportsMatchAllBit:
  202. If this bit is set, enumeration of all the records is supported
  203.  
  204. kSupportsBeginsWithBit:
  205. If this bit is set, enumeration of records matching prefix (e.g. Begin with abc)
  206. is supported
  207.  
  208. kSupportsExactMatchBit:
  209. If this bit is set, existence of a record matching exact matchNameString and recordType
  210. is supported.
  211.  
  212. kSupportsEndsWithBit:
  213. If this bit is set, enumeration of records matching suffix (e.g. end with abc)
  214. is supported.
  215.  
  216. kSupportsContainsBit:
  217. If this bit is set, enumeration of records containing a matchNameString (e.g. containing abc)
  218. is supported
  219.  
  220.  
  221. Implicit assumption in all these is, a record type can be specified either as one of the above or
  222. a type list(more then one) to match exact type.
  223. The Following four bits will indicate sort ordering in enumeration.
  224.  
  225. kSupportsOrderedEnumerationBit:
  226. If this bit is set, Enumerated records or in some order possibly in name order.
  227.  
  228. kCanSupportNameOrderBit:
  229. If this is set, catalog will support sortbyName option in Enumerate.
  230.  
  231. kCanSupportTypeOrderBit:
  232. If this bit is set, catalog will support sortbyType option in enumearte.
  233.  
  234. kSupportSortBackwardsBit:
  235. If this bit is set, catalog supports backward sorting.
  236.  
  237. kSupportIndexRatioBit:
  238. If this bit is set, it indicates that enumeration will return approximate position
  239. of a record (percentile) among all records.
  240.  
  241. kSupportsEnumerationContinueBit:
  242. If this bit is set, catalog supports enumeration continue.
  243.  
  244. kSupportsLookupContinueBit:
  245. If this bit is set, catalog supports lookup continue.
  246.  
  247. kSupportsEnumerateAttributeTypeContinueBit:
  248. If this bit is set, catalog supports EnumerateAttributeType continue.
  249.  
  250. kSupportsEnumeratePseudonymContinueBit:
  251. If this bit is set, catalog supports EnumeratePseudonym continue.
  252.  
  253. kSupportsAliasesBit:
  254. If this bit is set, catalog supports create/delte/enumerate 
  255. of Alias Records.
  256.  
  257. kSupportPseudonymBit: 
  258. If this bit is set, catalog supports create/delte/enumerate of 
  259. pseudonyms for a record.
  260.  
  261. kSupportsPartialPathNameBit:
  262. If this bit is set, catalog nodes can be specified using DNodeNumber of a 
  263. intermediate DNode and a partial name starting from that DNode to the intended 
  264. DNode.
  265.  
  266. kSupportsAuthenticationBit:
  267. If this bit is set, catalog supports authentication manager calls.
  268.  
  269. kSupportsProxiesBit:
  270. If this bit is set, catalog supports proxy related calls in authentication manager. 
  271.  
  272. kSupportsFindRecordBit:
  273. If this bit is set, catalog supports find record call.
  274.  
  275. Bits and corresponding masks are as defined below.
  276. */
  277. enum {
  278.     kSupportsDNodeNumberBit        = 0,
  279.     kSupportsRecordCreationIDBit = 1,
  280.     kSupportsAttributeCreationIDBit = 2,
  281.     kSupportsMatchAllBit        = 3,
  282.     kSupportsBeginsWithBit        = 4,
  283.     kSupportsExactMatchBit        = 5,
  284.     kSupportsEndsWithBit        = 6,
  285.     kSupportsContainsBit        = 7,
  286.     kSupportsOrderedEnumerationBit = 8,
  287.     kCanSupportNameOrderBit        = 9,
  288.     kCanSupportTypeOrderBit        = 10,
  289.     kSupportSortBackwardsBit    = 11,
  290.     kSupportIndexRatioBit        = 12,
  291.     kSupportsEnumerationContinueBit = 13,
  292.     kSupportsLookupContinueBit    = 14,
  293.     kSupportsEnumerateAttributeTypeContinueBit = 15,
  294.     kSupportsEnumeratePseudonymContinueBit = 16,
  295.     kSupportsAliasesBit            = 17,
  296.     kSupportsPseudonymsBit        = 18,
  297.     kSupportsPartialPathNamesBit = 19,
  298.     kSupportsAuthenticationBit    = 20,
  299.     kSupportsProxiesBit            = 21,
  300.     kSupportsFindRecordBit        = 22
  301. };
  302.  
  303. /* values of DirGestalt */
  304. enum {
  305.     kSupportsDNodeNumberMask    = 1L << kSupportsDNodeNumberBit,
  306.     kSupportsRecordCreationIDMask = 1L << kSupportsRecordCreationIDBit,
  307.     kSupportsAttributeCreationIDMask = 1L << kSupportsAttributeCreationIDBit,
  308.     kSupportsMatchAllMask        = 1L << kSupportsMatchAllBit,
  309.     kSupportsBeginsWithMask        = 1L << kSupportsBeginsWithBit,
  310.     kSupportsExactMatchMask        = 1L << kSupportsExactMatchBit,
  311.     kSupportsEndsWithMask        = 1L << kSupportsEndsWithBit,
  312.     kSupportsContainsMask        = 1L << kSupportsContainsBit,
  313.     kSupportsOrderedEnumerationMask = 1L << kSupportsOrderedEnumerationBit,
  314.     kCanSupportNameOrderMask    = 1L << kCanSupportNameOrderBit,
  315.     kCanSupportTypeOrderMask    = 1L << kCanSupportTypeOrderBit,
  316.     kSupportSortBackwardsMask    = 1L << kSupportSortBackwardsBit,
  317.     kSupportIndexRatioMask        = 1L << kSupportIndexRatioBit,
  318.     kSupportsEnumerationContinueMask = 1L << kSupportsEnumerationContinueBit,
  319.     kSupportsLookupContinueMask    = 1L << kSupportsLookupContinueBit,
  320.     kSupportsEnumerateAttributeTypeContinueMask = 1L << kSupportsEnumerateAttributeTypeContinueBit,
  321.     kSupportsEnumeratePseudonymContinueMask = 1L << kSupportsEnumeratePseudonymContinueBit,
  322.     kSupportsAliasesMask        = 1L << kSupportsAliasesBit,
  323.     kSupportsPseudonymsMask        = 1L << kSupportsPseudonymsBit,
  324.     kSupportsPartialPathNamesMask = 1L << kSupportsPartialPathNamesBit,
  325.     kSupportsAuthenticationMask    = 1L << kSupportsAuthenticationBit,
  326.     kSupportsProxiesMask        = 1L << kSupportsProxiesBit,
  327.     kSupportsFindRecordMask        = 1L << kSupportsFindRecordBit
  328. };
  329.  
  330.  
  331. /* Values of AuthLocalIdentityOp */
  332. enum {
  333.     kAuthLockLocalIdentityOp    = 1,
  334.     kAuthUnlockLocalIdentityOp    = 2,
  335.     kAuthLocalIdentityNameChangeOp = 3
  336. };
  337.  
  338. /* Values of AuthLocalIdentityLockAction */
  339. enum {
  340.     kAuthLockPending            = 1,
  341.     kAuthLockWillBeDone            = 2
  342. };
  343.  
  344.  
  345. /* Values of AuthNotifications */
  346. enum {
  347.     kNotifyLockBit                = 0,
  348.     kNotifyUnlockBit            = 1,
  349.     kNotifyNameChangeBit        = 2
  350. };
  351.  
  352. enum {
  353.     kNotifyLockMask                = 1L << kNotifyLockBit,
  354.     kNotifyUnlockMask            = 1L << kNotifyUnlockBit,
  355.     kNotifyNameChangeMask        = 1L << kNotifyNameChangeBit
  356. };
  357.  
  358. enum {
  359.     kPersonalDirectoryFileCreator = FOUR_CHAR_CODE('kl03'),
  360.     kPersonalDirectoryFileType    = FOUR_CHAR_CODE('pabt'),
  361.     kBusinessCardFileType        = FOUR_CHAR_CODE('bust'),
  362.     kDirectoryFileType            = FOUR_CHAR_CODE('dirt'),
  363.     kDNodeFileType                = FOUR_CHAR_CODE('dnod'),
  364.     kDirsRootFileType            = FOUR_CHAR_CODE('drtt'),
  365.     kRecordFileType                = FOUR_CHAR_CODE('rcrd')
  366. };
  367.  
  368. typedef unsigned short                     DirSortOption;
  369. typedef unsigned short                     DirSortDirection;
  370. typedef unsigned long                     AccessMask;
  371. typedef unsigned long                     DirGestalt;
  372. typedef unsigned long                     AuthLocalIdentityOp;
  373. typedef unsigned long                     AuthLocalIdentityLockAction;
  374. typedef unsigned long                     AuthNotifications;
  375.  
  376. struct DNodeID {
  377.     DNodeNum                         dNodeNumber;                /* dNodenumber  */
  378.     long                             reserved1;
  379.     RStringPtr                         name;
  380.     long                             reserved2;
  381. };
  382. typedef struct DNodeID                    DNodeID;
  383.  
  384. struct DirEnumSpec {
  385.     DirEnumChoices                     enumFlag;
  386.     unsigned short                     indexRatio;                    /* Approx Record Position between 1 and 100 If supported, 0 If not supported */
  387.     union {
  388.         LocalRecordID                     recordIdentifier;
  389.         DNodeID                         dNodeIdentifier;
  390.     }                                 u;
  391. };
  392. typedef struct DirEnumSpec                DirEnumSpec;
  393.  
  394. struct DirMetaInfo {
  395.     unsigned long                     info[4];
  396. };
  397. typedef struct DirMetaInfo                DirMetaInfo;
  398.  
  399. struct SLRV {
  400.     ScriptCode                         script;                        /*   Script code in which entries are sorted */
  401.     short                             language;                    /*   Language code in which entries are sorted */
  402.     short                             regionCode;                    /*   Region code in which entries are sorted */
  403.     short                             version;                    /*  version of oce sorting software */
  404. };
  405. typedef struct SLRV                        SLRV;
  406. /* Catalog types and operations */
  407. /* unique identifier for an identity */
  408.  
  409. typedef unsigned long                     AuthIdentity;
  410. /* Umbrella LocalIdentity */
  411. typedef AuthIdentity                     LocalIdentity;
  412. /* A DES key is 8 bytes of data */
  413.  
  414. struct DESKey {
  415.     unsigned long                     a;
  416.     unsigned long                     b;
  417. };
  418. typedef struct DESKey                    DESKey;
  419.  
  420. typedef Byte                             RC4Key[8];
  421. typedef unsigned long                     AuthKeyType;
  422. /* key type followed by its data */
  423.  
  424. struct AuthKey {
  425.     AuthKeyType                     keyType;
  426.     union {
  427.         DESKey                             des;
  428.         RC4Key                             rc4;
  429.     }                                 u;
  430. };
  431. typedef struct AuthKey                    AuthKey;
  432. typedef AuthKey *                        AuthKeyPtr;
  433. typedef union AuthParamBlock             AuthParamBlock;
  434.  
  435. typedef AuthParamBlock *                AuthParamBlockPtr;
  436. /* Fix parameter passing convention (#1274062) ggs, 8-7-95 */
  437. typedef CALLBACK_API( void , AuthIOCompletionProcPtr )(AuthParamBlockPtr paramBlock);
  438. /*
  439.     WARNING: AuthIOCompletionProcPtr uses register based parameters under classic 68k
  440.              and cannot be written in a high-level language without 
  441.              the help of mixed mode or assembly glue.
  442. */
  443. typedef REGISTER_UPP_TYPE(AuthIOCompletionProcPtr)                 AuthIOCompletionUPP;
  444. /*****************************************************************************
  445.  
  446.  
  447.         Authentication Manager operations 
  448.  
  449. *****************************************************************************/
  450. /*
  451. kAuthResolveCreationID:
  452. userRecord will contain the user information whose creationID has to be
  453. returned. A client must make this call when he does not know the creaitionID.
  454. The creationID must be set to nil before making the call. The server will attempt
  455. to match the recordid's in the data base which match the user name and
  456. type in the record.  Depending on number of matchings, following
  457. results will be returned.
  458. Exactly One Match : CreationID in RecordID and also in buffer (if buffer is given)
  459. totalMatches = actualMatches = 1.
  460. > 1 Match:
  461.     Buffer is Large Enough:
  462.     totalMatches = actualMatches
  463.     Buffer will contain all the CIDs, kOCEAmbiguousMatches error.
  464. > 1 Match:
  465.     Buffer is not Large Enough:
  466.     totalMatches > actualMatches
  467.     Buffer will contain all the CIDs (equal to actualMatches), daMoreDataError error.
  468. 0 Matches:
  469.  kOCENoSuchRecord error
  470. */
  471.  
  472. struct AuthResolveCreationIDPB {
  473.     void *                            qLink;
  474.     long                             reserved1;
  475.     long                             reserved2;
  476.     AuthIOCompletionUPP             ioCompletion;
  477.     OSErr                             ioResult;
  478.     unsigned long                     saveA5;
  479.     short                             reqCode;
  480.     long                             reserved[2];
  481.     AddrBlock                         serverHint;
  482.     short                             dsRefNum;
  483.     unsigned long                     callID;
  484.     AuthIdentity                     identity;
  485.     long                             gReserved1;
  486.     long                             gReserved2;
  487.     long                             gReserved3;
  488.     long                             clientData;
  489.     RecordIDPtr                     userRecord;                    /*  --> OCE name(Record) of the user */
  490.     unsigned long                     bufferLength;                /*  --> Buffer Size to hold duplicate Info */
  491.     void *                            buffer;                        /*  --> Buffer  to hold duplicate Info */
  492.     unsigned long                     totalMatches;                /* <--  Total Number of matching names found */
  493.     unsigned long                     actualMatches;                /* <--  Number of matches returned in the buffer */
  494. };
  495. typedef struct AuthResolveCreationIDPB    AuthResolveCreationIDPB;
  496. /*
  497. kAuthBindSpecificIdentity:
  498. userRecord will contain the user information whose identity has to be
  499. verified. userKey will contain the userKey. An Identity is returned which
  500. binds the key and the userRecord. The identity returned can be used in the 'identity'
  501. field in the header portion (AuthParamHeader) for authenticating the Catalog and
  502. Authentication manager calls.
  503. */
  504.  
  505. struct AuthBindSpecificIdentityPB {
  506.     void *                            qLink;
  507.     long                             reserved1;
  508.     long                             reserved2;
  509.     AuthIOCompletionUPP             ioCompletion;
  510.     OSErr                             ioResult;
  511.     unsigned long                     saveA5;
  512.     short                             reqCode;
  513.     long                             reserved[2];
  514.     AddrBlock                         serverHint;
  515.     short                             dsRefNum;
  516.     unsigned long                     callID;
  517.     AuthIdentity                     identity;
  518.     long                             gReserved1;
  519.     long                             gReserved2;
  520.     long                             gReserved3;
  521.     long                             clientData;
  522.     AuthIdentity                     userIdentity;                /* <--  binding identity */
  523.     RecordIDPtr                     userRecord;                    /*  --> OCE name(Record) of the user */
  524.     AuthKeyPtr                         userKey;                    /*  --> OCE Key for the user */
  525. };
  526. typedef struct AuthBindSpecificIdentityPB AuthBindSpecificIdentityPB;
  527. /*
  528. kAuthUnbindSpecificIdentity:
  529. This call will unbind the userRecord and key which were bind earlier.
  530. */
  531.  
  532. struct AuthUnbindSpecificIdentityPB {
  533.     void *                            qLink;
  534.     long                             reserved1;
  535.     long                             reserved2;
  536.     AuthIOCompletionUPP             ioCompletion;
  537.     OSErr                             ioResult;
  538.     unsigned long                     saveA5;
  539.     short                             reqCode;
  540.     long                             reserved[2];
  541.     AddrBlock                         serverHint;
  542.     short                             dsRefNum;
  543.     unsigned long                     callID;
  544.     AuthIdentity                     identity;
  545.     long                             gReserved1;
  546.     long                             gReserved2;
  547.     long                             gReserved3;
  548.     long                             clientData;
  549.     AuthIdentity                     userIdentity;                /*  --> identity to be deleted */
  550. };
  551. typedef struct AuthUnbindSpecificIdentityPB AuthUnbindSpecificIdentityPB;
  552.  
  553. /*
  554. kAuthGetSpecificIdentityInfo:
  555. This call will return the userRecord for the given identity. Note: key is not
  556. returned because this would compromise security.
  557. */
  558.  
  559. struct AuthGetSpecificIdentityInfoPB {
  560.     void *                            qLink;
  561.     long                             reserved1;
  562.     long                             reserved2;
  563.     AuthIOCompletionUPP             ioCompletion;
  564.     OSErr                             ioResult;
  565.     unsigned long                     saveA5;
  566.     short                             reqCode;
  567.     long                             reserved[2];
  568.     AddrBlock                         serverHint;
  569.     short                             dsRefNum;
  570.     unsigned long                     callID;
  571.     AuthIdentity                     identity;
  572.     long                             gReserved1;
  573.     long                             gReserved2;
  574.     long                             gReserved3;
  575.     long                             clientData;
  576.     AuthIdentity                     userIdentity;                /*  --> identity of initiator */
  577.     RecordIDPtr                     userRecord;                    /* <--  OCE name(Record) of the user */
  578. };
  579. typedef struct AuthGetSpecificIdentityInfoPB AuthGetSpecificIdentityInfoPB;
  580.  
  581. /*
  582. kAuthAddKey:
  583. userRecord will contain the user information whose identity has to be
  584. created. userKey will point to the key to be created. password points to
  585. an RString containing the password used to generate the key.
  586. */
  587.  
  588. struct AuthAddKeyPB {
  589.     void *                            qLink;
  590.     long                             reserved1;
  591.     long                             reserved2;
  592.     AuthIOCompletionUPP             ioCompletion;
  593.     OSErr                             ioResult;
  594.     unsigned long                     saveA5;
  595.     short                             reqCode;
  596.     long                             reserved[2];
  597.     AddrBlock                         serverHint;
  598.     short                             dsRefNum;
  599.     unsigned long                     callID;
  600.     AuthIdentity                     identity;
  601.     long                             gReserved1;
  602.     long                             gReserved2;
  603.     long                             gReserved3;
  604.     long                             clientData;
  605.     RecordIDPtr                     userRecord;                    /*  --> OCE name(Record) of the user */
  606.     AuthKeyPtr                         userKey;                    /* <--  OCE Key for the user */
  607.     RStringPtr                         password;                    /*  --> Pointer to password string */
  608. };
  609. typedef struct AuthAddKeyPB                AuthAddKeyPB;
  610. /*
  611. kAuthChangeKey:
  612. userRecord will contain the user information whose identity has to be
  613. created. userKey will point to the key to be created. password points to
  614. an RString containing the password used to generate the key.
  615. */
  616.  
  617. struct AuthChangeKeyPB {
  618.     void *                            qLink;
  619.     long                             reserved1;
  620.     long                             reserved2;
  621.     AuthIOCompletionUPP             ioCompletion;
  622.     OSErr                             ioResult;
  623.     unsigned long                     saveA5;
  624.     short                             reqCode;
  625.     long                             reserved[2];
  626.     AddrBlock                         serverHint;
  627.     short                             dsRefNum;
  628.     unsigned long                     callID;
  629.     AuthIdentity                     identity;
  630.     long                             gReserved1;
  631.     long                             gReserved2;
  632.     long                             gReserved3;
  633.     long                             clientData;
  634.     RecordIDPtr                     userRecord;                    /*  --> OCE name(Record) of the user */
  635.     AuthKeyPtr                         userKey;                    /* <--  New OCE Key for the user */
  636.     RStringPtr                         password;                    /*  -->Pointer to the new password string */
  637. };
  638. typedef struct AuthChangeKeyPB            AuthChangeKeyPB;
  639. /*
  640. AuthDeleteKey:
  641. userRecord will contain the user information whose Key has to be deleted.
  642. */
  643.  
  644. struct AuthDeleteKeyPB {
  645.     void *                            qLink;
  646.     long                             reserved1;
  647.     long                             reserved2;
  648.     AuthIOCompletionUPP             ioCompletion;
  649.     OSErr                             ioResult;
  650.     unsigned long                     saveA5;
  651.     short                             reqCode;
  652.     long                             reserved[2];
  653.     AddrBlock                         serverHint;
  654.     short                             dsRefNum;
  655.     unsigned long                     callID;
  656.     AuthIdentity                     identity;
  657.     long                             gReserved1;
  658.     long                             gReserved2;
  659.     long                             gReserved3;
  660.     long                             clientData;
  661.     RecordIDPtr                     userRecord;                    /*  --> OCE name(Record) of the user */
  662. };
  663. typedef struct AuthDeleteKeyPB            AuthDeleteKeyPB;
  664. /* AuthPasswordToKey: Converts an RString into a key. */
  665.  
  666. struct AuthPasswordToKeyPB {
  667.     void *                            qLink;
  668.     long                             reserved1;
  669.     long                             reserved2;
  670.     AuthIOCompletionUPP             ioCompletion;
  671.     OSErr                             ioResult;
  672.     unsigned long                     saveA5;
  673.     short                             reqCode;
  674.     long                             reserved[2];
  675.     AddrBlock                         serverHint;
  676.     short                             dsRefNum;
  677.     unsigned long                     callID;
  678.     AuthIdentity                     identity;
  679.     long                             gReserved1;
  680.     long                             gReserved2;
  681.     long                             gReserved3;
  682.     long                             clientData;
  683.     RecordIDPtr                     userRecord;                    /*  --> OCE name(Record) of the user */
  684.     AuthKeyPtr                         key;                        /* <--  */
  685.     RStringPtr                         password;                    /*  -->Pointer to the new password string */
  686. };
  687. typedef struct AuthPasswordToKeyPB        AuthPasswordToKeyPB;
  688. /*
  689. kAuthGetCredentials:
  690. userRecord will contain the user information whose identity has to be
  691. kMailDeletedMask. keyType (e.g. asDESKey) will indicate what type of key has to
  692. be deleted.
  693. */
  694.  
  695. struct AuthGetCredentialsPB {
  696.     void *                            qLink;
  697.     long                             reserved1;
  698.     long                             reserved2;
  699.     AuthIOCompletionUPP             ioCompletion;
  700.     OSErr                             ioResult;
  701.     unsigned long                     saveA5;
  702.     short                             reqCode;
  703.     long                             reserved[2];
  704.     AddrBlock                         serverHint;
  705.     short                             dsRefNum;
  706.     unsigned long                     callID;
  707.     AuthIdentity                     identity;
  708.     long                             gReserved1;
  709.     long                             gReserved2;
  710.     long                             gReserved3;
  711.     long                             clientData;
  712.     AuthIdentity                     userIdentity;                /*  --> identity of initiator */
  713.     RecordIDPtr                     recipient;                    /*  --> OCE name of recipient */
  714.     AuthKeyPtr                         sessionKey;                    /* <--  session key */
  715.     UTCTime                         expiry;                        /* <--> desired/actual expiry */
  716.     unsigned long                     credentialsLength;            /* <--> max/actual credentials size */
  717.     void *                            credentials;                /* <--  buffer where credentials are returned */
  718. };
  719. typedef struct AuthGetCredentialsPB        AuthGetCredentialsPB;
  720. /*
  721. AuthDecryptCredentialsPB:
  722. Changes:
  723. userKey is changed userIdentity.
  724. userRecord is changed to initiatorRecord. User must supply buffer
  725. to hold initiatorRecord.
  726. agentList has changed to agent. There wil be no call back.
  727. User must supply buffer to hold agent Record.
  728. An additional boolean parameter 'hasAgent' is included.
  729. Toolbox will set this if an 'Agent' record is found in the
  730. credentials. If RecordIDPtr is 'nil', no agent record will
  731. be copied. However user can examine 'hasAgent', If true user
  732. can reissue this call with apprpriate buffer for getting a recordID.
  733. agent has changed to intermediary.  User must supply buffer to hold 
  734. intermediary Record.  The toolbox will set 'hasIntermediary' if an
  735. 'intermediary' record is found in the credentials. 
  736. */
  737.  
  738. struct AuthDecryptCredentialsPB {
  739.     void *                            qLink;
  740.     long                             reserved1;
  741.     long                             reserved2;
  742.     AuthIOCompletionUPP             ioCompletion;
  743.     OSErr                             ioResult;
  744.     unsigned long                     saveA5;
  745.     short                             reqCode;
  746.     long                             reserved[2];
  747.     AddrBlock                         serverHint;
  748.     short                             dsRefNum;
  749.     unsigned long                     callID;
  750.     AuthIdentity                     identity;
  751.     long                             gReserved1;
  752.     long                             gReserved2;
  753.     long                             gReserved3;
  754.     long                             clientData;
  755.     AuthIdentity                     userIdentity;                /*  --> user's Identity */
  756.     RecordIDPtr                     initiatorRecord;            /* <--  OCE name of the initiator */
  757.     AuthKeyPtr                         sessionKey;                    /* <--  session key */
  758.     UTCTime                         expiry;                        /* <--  credentials expiry time */
  759.     unsigned long                     credentialsLength;            /*  --> actual credentials size */
  760.     void *                            credentials;                /*  --> credentials to be decrypted */
  761.     UTCTime                         issueTime;                    /* <--  credentials expiry time */
  762.     Boolean                         hasIntermediary;            /* <--  if true, An intermediary Record was found in credentials */
  763.     Boolean                         filler1;
  764.     RecordIDPtr                     intermediary;                /* <--  recordID of the intermediary */
  765. };
  766. typedef struct AuthDecryptCredentialsPB    AuthDecryptCredentialsPB;
  767.  
  768.  
  769. struct AuthMakeChallengePB {
  770.     void *                            qLink;
  771.     long                             reserved1;
  772.     long                             reserved2;
  773.     AuthIOCompletionUPP             ioCompletion;
  774.     OSErr                             ioResult;
  775.     unsigned long                     saveA5;
  776.     short                             reqCode;
  777.     long                             reserved[2];
  778.     AddrBlock                         serverHint;
  779.     short                             dsRefNum;
  780.     unsigned long                     callID;
  781.     AuthIdentity                     identity;
  782.     long                             gReserved1;
  783.     long                             gReserved2;
  784.     long                             gReserved3;
  785.     long                             clientData;
  786.     AuthKeyPtr                         key;                        /*  --> UnEncrypted SessionKey */
  787.     void *                            challenge;                    /* <--  Encrypted Challenge */
  788.     unsigned long                     challengeBufferLength;        /*  ->length of challenge buffer */
  789.     unsigned long                     challengeLength;            /*  <-length of Encrypted Challenge */
  790. };
  791. typedef struct AuthMakeChallengePB        AuthMakeChallengePB;
  792.  
  793. struct AuthMakeReplyPB {
  794.     void *                            qLink;
  795.     long                             reserved1;
  796.     long                             reserved2;
  797.     AuthIOCompletionUPP             ioCompletion;
  798.     OSErr                             ioResult;
  799.     unsigned long                     saveA5;
  800.     short                             reqCode;
  801.     long                             reserved[2];
  802.     AddrBlock                         serverHint;
  803.     short                             dsRefNum;
  804.     unsigned long                     callID;
  805.     AuthIdentity                     identity;
  806.     long                             gReserved1;
  807.     long                             gReserved2;
  808.     long                             gReserved3;
  809.     long                             clientData;
  810.     AuthKeyPtr                         key;                        /*  --> UnEncrypted SessionKey */
  811.     void *                            challenge;                    /*  --> Encrypted Challenge */
  812.     void *                            reply;                        /* <--  Encrypted Reply */
  813.     unsigned long                     replyBufferLength;            /*  -->length of challenge buffer */
  814.     unsigned long                     challengeLength;            /*  --> length of Encrypted Challenge */
  815.     unsigned long                     replyLength;                /* <--  length of Encrypted Reply */
  816. };
  817. typedef struct AuthMakeReplyPB            AuthMakeReplyPB;
  818.  
  819. struct AuthVerifyReplyPB {
  820.     void *                            qLink;
  821.     long                             reserved1;
  822.     long                             reserved2;
  823.     AuthIOCompletionUPP             ioCompletion;
  824.     OSErr                             ioResult;
  825.     unsigned long                     saveA5;
  826.     short                             reqCode;
  827.     long                             reserved[2];
  828.     AddrBlock                         serverHint;
  829.     short                             dsRefNum;
  830.     unsigned long                     callID;
  831.     AuthIdentity                     identity;
  832.     long                             gReserved1;
  833.     long                             gReserved2;
  834.     long                             gReserved3;
  835.     long                             clientData;
  836.     AuthKeyPtr                         key;                        /*  --> UnEncrypted SessionKey */
  837.     void *                            challenge;                    /*  --> Encrypted Challenge */
  838.     void *                            reply;                        /*  --> Encrypted Reply */
  839.     unsigned long                     challengeLength;            /*  --> length of Encrypted Challenge */
  840.     unsigned long                     replyLength;                /*  --> length of Encrypted Reply */
  841. };
  842. typedef struct AuthVerifyReplyPB        AuthVerifyReplyPB;
  843.  
  844.  
  845. /*
  846. kAuthGetUTCTime:
  847. RLI will contain a valid RLI for a cluster server.
  848. UTC(GMT) time from one of the cluster server will be returned.
  849. An 'offSet' from UTC(GMT) to Mac Local Time will also be returned.
  850. If RLI is nil Map DA is used to determine UTC(GMT).
  851. Mac Local Time = theUTCTime + theUTCOffset.
  852. */
  853.  
  854. struct AuthGetUTCTimePB {
  855.     void *                            qLink;
  856.     long                             reserved1;
  857.     long                             reserved2;
  858.     AuthIOCompletionUPP             ioCompletion;
  859.     OSErr                             ioResult;
  860.     unsigned long                     saveA5;
  861.     short                             reqCode;
  862.     long                             reserved[2];
  863.     AddrBlock                         serverHint;
  864.     short                             dsRefNum;
  865.     unsigned long                     callID;
  866.     AuthIdentity                     identity;
  867.     long                             gReserved1;
  868.     long                             gReserved2;
  869.     long                             gReserved3;
  870.     long                             clientData;
  871.     PackedRLIPtr                     pRLI;                        /*  --> packed RLI of the Node, whose server's UTC is requested */
  872.     UTCTime                         theUTCTime;                    /* <--  current UTC(GMT) Time utc seconds since 1/1/1904 */
  873.     UTCOffset                         theUTCOffset;                /* <--  offset from UTC(GMT) seconds EAST of Greenwich */
  874. };
  875. typedef struct AuthGetUTCTimePB            AuthGetUTCTimePB;
  876.  
  877. /*
  878. kAuthMakeProxy:
  879. A user represented bu the 'userIdentity' can make a proxy using this call.
  880. 'recipient' is the RecordID of the recipient whom user is requesting proxy.
  881. 'intermediary' is the RecordID of the intermediary holding proxy for the user.
  882. 'firstValid' is time at which proxy becomes valid.
  883. 'expiry' is the time at which proxy must expire.
  884. 'proxyLength' will have the length of the buffer pointed by 'proxy' as input.
  885. When the call completes, it will hold the actual length of proxy. If the
  886. call completes 'kOCEMoreData' error, client can reissue the call with the
  887. buffer size as 'proxyLength' returned.
  888. expiry is a suggestion, and may be adjusted to be earlier by the ADAP/OCE server.
  889. The 'proxy' obtained like this might be used by the 'intermediary' to obtain credentials
  890. for the server using TradeProxyForCredentials call.
  891. authDataLength and authData are intended for possible future work, but are
  892. ignored for now.
  893. */
  894.  
  895. struct AuthMakeProxyPB {
  896.     void *                            qLink;
  897.     long                             reserved1;
  898.     long                             reserved2;
  899.     AuthIOCompletionUPP             ioCompletion;
  900.     OSErr                             ioResult;
  901.     unsigned long                     saveA5;
  902.     short                             reqCode;
  903.     long                             reserved[2];
  904.     AddrBlock                         serverHint;
  905.     short                             dsRefNum;
  906.     unsigned long                     callID;
  907.     AuthIdentity                     identity;
  908.     long                             gReserved1;
  909.     long                             gReserved2;
  910.     long                             gReserved3;
  911.     long                             clientData;
  912.     AuthIdentity                     userIdentity;                /*  --> identity of principal */
  913.     RecordIDPtr                     recipient;                    /*  --> OCE name of recipient */
  914.     UTCTime                         firstValid;                    /*  --> time at which proxy becomes valid */
  915.     UTCTime                         expiry;                        /*  --> time at which proxy expires */
  916.     unsigned long                     authDataLength;                /*  --> size of authorization data */
  917.     void *                            authData;                    /*  --> pointer to authorization data */
  918.     unsigned long                     proxyLength;                /* <--> max/actual proxy size */
  919.     void *                            proxy;                        /* <--> buffer where proxy is returned */
  920.     RecordIDPtr                     intermediary;                /*  --> RecordID of intermediary */
  921. };
  922. typedef struct AuthMakeProxyPB            AuthMakeProxyPB;
  923. /*
  924. kAuthTradeProxyForCredentials:
  925. Using this call, intermediary holding a 'proxy' for a recipient may obtain credentials
  926. for that recipient. 'userIdentity' is the identity for the 'intermediary'.
  927. 'recipient' is the RecordID for whom credetials are requested.
  928. 'principal' is the RecordID of the user who created the proxy.
  929. 'proxyLength' is the length of data pointed by 'proxy.
  930. If the call is succesfull, credentials will be returned in the
  931. buffer pointed by 'credentials'. 'expiry' is the desired expiry time at input.
  932. When call succeds this will have expiry time of credentials.
  933. This is very similar to GetCredentials except that we (of course) need the proxy,
  934. but we also need the name of the principal who created the proxy.
  935. */
  936.  
  937. struct AuthTradeProxyForCredentialsPB {
  938.     void *                            qLink;
  939.     long                             reserved1;
  940.     long                             reserved2;
  941.     AuthIOCompletionUPP             ioCompletion;
  942.     OSErr                             ioResult;
  943.     unsigned long                     saveA5;
  944.     short                             reqCode;
  945.     long                             reserved[2];
  946.     AddrBlock                         serverHint;
  947.     short                             dsRefNum;
  948.     unsigned long                     callID;
  949.     AuthIdentity                     identity;
  950.     long                             gReserved1;
  951.     long                             gReserved2;
  952.     long                             gReserved3;
  953.     long                             clientData;
  954.     AuthIdentity                     userIdentity;                /*  --> identity of intermediary */
  955.     RecordIDPtr                     recipient;                    /*  --> OCE name of recipient */
  956.     AuthKeyPtr                         sessionKey;                    /* <--  session key */
  957.     UTCTime                         expiry;                        /* <--> desired/actual expiry */
  958.     unsigned long                     credentialsLength;            /* <--> max/actual credentials size */
  959.     void *                            credentials;                /* <--> buffer where credentials are returned */
  960.     unsigned long                     proxyLength;                /*  --> actual proxy size */
  961.     void *                            proxy;                        /*  --> buffer containing proxy */
  962.     RecordIDPtr                     principal;                    /*  --> RecordID of principal */
  963. };
  964. typedef struct AuthTradeProxyForCredentialsPB AuthTradeProxyForCredentialsPB;
  965. /* API for Local Identity Interface */
  966. /*
  967. AuthGetLocalIdentityPB:
  968. A Collaborative application intended to work under the umbrella of LocalIdentity
  969. for the OCE toolbox will have to make this call to obtain LocalIdentity.
  970. If LocalIdentity has not been setup, then application will get
  971. 'kOCEOCESetupRequired.'. In this case application should put the dialog
  972. recommended by the OCE Setup document and guide the user through OCE Setup.
  973. If the OCESetup contains local identity, but user has not unlocked, it will get
  974. kOCELocalAuthenticationFail. In this case application should use SDPPromptForLocalIdentity
  975. to prompt user for the password.
  976. If a backGround application or stand alone code requires LocalIdentity, if it gets the
  977. OSErr from LocalIdentity and can not call SDPPromptForLocalIdentity, it should it self
  978. register with the toolbox using kAuthAddToLocalIdentityQueue call. It will be notified
  979. when a LocalIdentity gets created by a foreground application.
  980. */
  981.  
  982. struct AuthGetLocalIdentityPB {
  983.     void *                            qLink;
  984.     long                             reserved1;
  985.     long                             reserved2;
  986.     AuthIOCompletionUPP             ioCompletion;
  987.     OSErr                             ioResult;
  988.     unsigned long                     saveA5;
  989.     short                             reqCode;
  990.     long                             reserved[2];
  991.     AddrBlock                         serverHint;
  992.     short                             dsRefNum;
  993.     unsigned long                     callID;
  994.     AuthIdentity                     identity;
  995.     long                             gReserved1;
  996.     long                             gReserved2;
  997.     long                             gReserved3;
  998.     long                             clientData;
  999.     LocalIdentity                     theLocalIdentity;            /* <--  LocalIdentity */
  1000. };
  1001. typedef struct AuthGetLocalIdentityPB    AuthGetLocalIdentityPB;
  1002. /*
  1003. kAuthUnlockLocalIdentity:
  1004. The LocalIdentity can be created using this call.
  1005. The userName and password correspond to the LocalIdentity setup.
  1006. If the password matches, then collabIdentity will be returned.
  1007. Typically SDPPromptForLocalIdentity call will make this call.
  1008. All applications which are registered through kAuthAddToLocalIdentityQueue
  1009. will be notified.
  1010. */
  1011.  
  1012. struct AuthUnlockLocalIdentityPB {
  1013.     void *                            qLink;
  1014.     long                             reserved1;
  1015.     long                             reserved2;
  1016.     AuthIOCompletionUPP             ioCompletion;
  1017.     OSErr                             ioResult;
  1018.     unsigned long                     saveA5;
  1019.     short                             reqCode;
  1020.     long                             reserved[2];
  1021.     AddrBlock                         serverHint;
  1022.     short                             dsRefNum;
  1023.     unsigned long                     callID;
  1024.     AuthIdentity                     identity;
  1025.     long                             gReserved1;
  1026.     long                             gReserved2;
  1027.     long                             gReserved3;
  1028.     long                             clientData;
  1029.     LocalIdentity                     theLocalIdentity;            /* <--  LocalIdentity */
  1030.     RStringPtr                         userName;                    /*  --> userName */
  1031.     RStringPtr                         password;                    /*  -->user password */
  1032. };
  1033. typedef struct AuthUnlockLocalIdentityPB AuthUnlockLocalIdentityPB;
  1034. /*
  1035. kAuthLockLocalIdentity:
  1036. With this call existing LocalIdentity can be locked. If the ASDeleteLocalIdetity
  1037. call fails with 'kOCEOperationDenied' error, name will contain the application which
  1038. denied the operation. This name will be supplied by the application
  1039. when it registered through kAuthAddToLocalIdentityQueue call
  1040. */
  1041.  
  1042. struct AuthLockLocalIdentityPB {
  1043.     void *                            qLink;
  1044.     long                             reserved1;
  1045.     long                             reserved2;
  1046.     AuthIOCompletionUPP             ioCompletion;
  1047.     OSErr                             ioResult;
  1048.     unsigned long                     saveA5;
  1049.     short                             reqCode;
  1050.     long                             reserved[2];
  1051.     AddrBlock                         serverHint;
  1052.     short                             dsRefNum;
  1053.     unsigned long                     callID;
  1054.     AuthIdentity                     identity;
  1055.     long                             gReserved1;
  1056.     long                             gReserved2;
  1057.     long                             gReserved3;
  1058.     long                             clientData;
  1059.     LocalIdentity                     theLocalIdentity;            /*  --> LocalIdentity */
  1060.     StringPtr                         name;                        /* <--  name of the app which denied delete */
  1061. };
  1062. typedef struct AuthLockLocalIdentityPB    AuthLockLocalIdentityPB;
  1063. typedef CALLBACK_API( Boolean , NotificationProcPtr )(long clientData, AuthLocalIdentityOp callValue, AuthLocalIdentityLockAction actionValue, LocalIdentity identity);
  1064. typedef STACK_UPP_TYPE(NotificationProcPtr)                     NotificationUPP;
  1065.  
  1066. typedef NotificationUPP                 NotificationProc;
  1067. /*
  1068. kAuthAddToLocalIdentityQueue:
  1069. An application requiring notification of locking/unlocking of the
  1070. LocalIdentity can install itself using this call. The function provided
  1071. in 'notifyProc' will be called whenever the requested event happens.
  1072. When an AuthLockLocalIdentity call is made to the toolbox, the notificationProc
  1073. will be called with 'kAuthLockPending'. The application may refuse the lock by returning
  1074. a 'true' value. If all the registered entries return 'false' value, locking will be done
  1075. successfully. Otherwise 'kOCEOperationDenied' error is returned to the caller. The appName
  1076. (registered with the notificationProc) of the application which denied locking is also
  1077. returned to the caller making the AuthLockIdentity call.
  1078. */
  1079.  
  1080. struct AuthAddToLocalIdentityQueuePB {
  1081.     void *                            qLink;
  1082.     long                             reserved1;
  1083.     long                             reserved2;
  1084.     AuthIOCompletionUPP             ioCompletion;
  1085.     OSErr                             ioResult;
  1086.     unsigned long                     saveA5;
  1087.     short                             reqCode;
  1088.     long                             reserved[2];
  1089.     AddrBlock                         serverHint;
  1090.     short                             dsRefNum;
  1091.     unsigned long                     callID;
  1092.     AuthIdentity                     identity;
  1093.     long                             gReserved1;
  1094.     long                             gReserved2;
  1095.     long                             gReserved3;
  1096.     long                             clientData;
  1097.     NotificationUPP                 notifyProc;                    /*  --> notification procedure */
  1098.     AuthNotifications                 notifyFlags;                /*  --> notifyFlags */
  1099.     StringPtr                         appName;                    /*  --> name of application to be returned in Delete/Stop */
  1100. };
  1101. typedef struct AuthAddToLocalIdentityQueuePB AuthAddToLocalIdentityQueuePB;
  1102. /*
  1103. kAuthRemoveFromLocalIdentityQueue:*/
  1104.  
  1105. struct AuthRemoveFromLocalIdentityQueuePB {
  1106.     void *                            qLink;
  1107.     long                             reserved1;
  1108.     long                             reserved2;
  1109.     AuthIOCompletionUPP             ioCompletion;
  1110.     OSErr                             ioResult;
  1111.     unsigned long                     saveA5;
  1112.     short                             reqCode;
  1113.     long                             reserved[2];
  1114.     AddrBlock                         serverHint;
  1115.     short                             dsRefNum;
  1116.     unsigned long                     callID;
  1117.     AuthIdentity                     identity;
  1118.     long                             gReserved1;
  1119.     long                             gReserved2;
  1120.     long                             gReserved3;
  1121.     long                             clientData;
  1122.     NotificationUPP                 notifyProc;                    /*  --> notification procedure */
  1123. };
  1124. typedef struct AuthRemoveFromLocalIdentityQueuePB AuthRemoveFromLocalIdentityQueuePB;
  1125. /*
  1126. kAuthSetupLocalIdentity:
  1127. The LocalIdentity can be Setup using this call.
  1128. The userName and password correspond to the LocalIdentity setup.
  1129. If a LocalIdentity Setup already exists 'kOCELocalIdentitySetupExists' error
  1130. will be returned.
  1131. */
  1132.  
  1133. struct AuthSetupLocalIdentityPB {
  1134.     void *                            qLink;
  1135.     long                             reserved1;
  1136.     long                             reserved2;
  1137.     AuthIOCompletionUPP             ioCompletion;
  1138.     OSErr                             ioResult;
  1139.     unsigned long                     saveA5;
  1140.     short                             reqCode;
  1141.     long                             reserved[2];
  1142.     AddrBlock                         serverHint;
  1143.     short                             dsRefNum;
  1144.     unsigned long                     callID;
  1145.     AuthIdentity                     identity;
  1146.     long                             gReserved1;
  1147.     long                             gReserved2;
  1148.     long                             gReserved3;
  1149.     long                             clientData;
  1150.     long                             aReserved;                    /*  --  */
  1151.     RStringPtr                         userName;                    /*  --> userName */
  1152.     RStringPtr                         password;                    /*  -->user password */
  1153. };
  1154. typedef struct AuthSetupLocalIdentityPB    AuthSetupLocalIdentityPB;
  1155. /*
  1156. kAuthChangeLocalIdentity:
  1157. An existing LocalIdentity  Setup can be changed using this call.
  1158. The userName and password correspond to the LocalIdentity setup.
  1159. If a LocalIdentity Setup does not exists 'kOCEOCESetupRequired' error
  1160. will be returned. The user can use  kAuthSetupLocalIdentity call to setit up.
  1161. If the 'password' does not correspond to the existing setup, 'kOCELocalAuthenticationFail'
  1162. OSErr will be returned. If successful, LocalID will have new name as 'userName' and
  1163. password as 'newPassword' and if any applications has installed into 
  1164. LocalIdentityQueue with kNotifyNameChangeMask set, it will be notified with 
  1165. kAuthLocalIdentityNameChangeOp action value. 
  1166.  
  1167. */
  1168.  
  1169. struct AuthChangeLocalIdentityPB {
  1170.     void *                            qLink;
  1171.     long                             reserved1;
  1172.     long                             reserved2;
  1173.     AuthIOCompletionUPP             ioCompletion;
  1174.     OSErr                             ioResult;
  1175.     unsigned long                     saveA5;
  1176.     short                             reqCode;
  1177.     long                             reserved[2];
  1178.     AddrBlock                         serverHint;
  1179.     short                             dsRefNum;
  1180.     unsigned long                     callID;
  1181.     AuthIdentity                     identity;
  1182.     long                             gReserved1;
  1183.     long                             gReserved2;
  1184.     long                             gReserved3;
  1185.     long                             clientData;
  1186.     long                             aReserved;                    /*  --  */
  1187.     RStringPtr                         userName;                    /*  --> userName */
  1188.     RStringPtr                         password;                    /*  --> current password */
  1189.     RStringPtr                         newPassword;                /*  --> new password */
  1190. };
  1191. typedef struct AuthChangeLocalIdentityPB AuthChangeLocalIdentityPB;
  1192. /*
  1193. kAuthRemoveLocalIdentity:
  1194. An existing LocalIdentity  Setup can be removed using this call.
  1195. The userName and password correspond to the LocalIdentity setup.
  1196. If a LocalIdentity Setup does not exists 'kOCEOCESetupRequired' error
  1197. will be returned.
  1198. If the 'password' does not correspond to the existing setup, 'kOCELocalAuthenticationFail'
  1199. OSErr will be returned. If successful, LocalIdentity will be removed from the OCE Setup.
  1200. This is a very distructive operation, user must be warned enough before actually making
  1201. this call.
  1202. */
  1203.  
  1204. struct AuthRemoveLocalIdentityPB {
  1205.     void *                            qLink;
  1206.     long                             reserved1;
  1207.     long                             reserved2;
  1208.     AuthIOCompletionUPP             ioCompletion;
  1209.     OSErr                             ioResult;
  1210.     unsigned long                     saveA5;
  1211.     short                             reqCode;
  1212.     long                             reserved[2];
  1213.     AddrBlock                         serverHint;
  1214.     short                             dsRefNum;
  1215.     unsigned long                     callID;
  1216.     AuthIdentity                     identity;
  1217.     long                             gReserved1;
  1218.     long                             gReserved2;
  1219.     long                             gReserved3;
  1220.     long                             clientData;
  1221.     long                             aReserved;                    /*  --  */
  1222.     RStringPtr                         userName;                    /*  --> userName */
  1223.     RStringPtr                         password;                    /*  --> current password */
  1224. };
  1225. typedef struct AuthRemoveLocalIdentityPB AuthRemoveLocalIdentityPB;
  1226. /*
  1227. kOCESetupAddDirectoryInfo:
  1228. Using this call identity for a catalog can be setup under LocalIdentity umbrella.
  1229. ASCreateLocalIdentity should have been done succesfully before making this call.    
  1230. directoryRecordCID -> is the record creationID obtained when DirAddOCEDirectory or
  1231. DirAddDSAMDirectory call was made.
  1232. rid-> is the recordID in which the identity for the catalog will be established.
  1233. password-> the password associated with the rid in the catalog world.
  1234. */
  1235.  
  1236. struct OCESetupAddDirectoryInfoPB {
  1237.     void *                            qLink;
  1238.     long                             reserved1;
  1239.     long                             reserved2;
  1240.     AuthIOCompletionUPP             ioCompletion;
  1241.     OSErr                             ioResult;
  1242.     unsigned long                     saveA5;
  1243.     short                             reqCode;
  1244.     long                             reserved[2];
  1245.     AddrBlock                         serverHint;
  1246.     short                             dsRefNum;
  1247.     unsigned long                     callID;
  1248.     AuthIdentity                     identity;
  1249.     long                             gReserved1;
  1250.     long                             gReserved2;
  1251.     long                             gReserved3;
  1252.     long                             clientData;
  1253.     CreationID                         directoryRecordCID;            /*  --> CreationID for the catalog */
  1254.     RecordIDPtr                     recordID;                    /*  --> recordID for the identity */
  1255.     RStringPtr                         password;                    /*  --> password in the catalog world */
  1256. };
  1257. typedef struct OCESetupAddDirectoryInfoPB OCESetupAddDirectoryInfoPB;
  1258. /*
  1259. kOCESetupChangeDirectoryInfo:
  1260. Using this call an existing identity for a catalog under LocalIdentity umbrella
  1261. can be changed.
  1262. ASCreateLocalIdentity should have been done succesfully before making this call.
  1263. directoryRecordCID -> is the record creationID obtained when DirAddOCEDirectory or
  1264. DirAddDSAMDirectory call was made.
  1265. rid-> is the recordID in which the identity for the catalog will be established.
  1266. password-> the password associated with the rid in the catalog world.
  1267. newPassword -> the new password for the catalog
  1268. */
  1269.  
  1270. struct OCESetupChangeDirectoryInfoPB {
  1271.     void *                            qLink;
  1272.     long                             reserved1;
  1273.     long                             reserved2;
  1274.     AuthIOCompletionUPP             ioCompletion;
  1275.     OSErr                             ioResult;
  1276.     unsigned long                     saveA5;
  1277.     short                             reqCode;
  1278.     long                             reserved[2];
  1279.     AddrBlock                         serverHint;
  1280.     short                             dsRefNum;
  1281.     unsigned long                     callID;
  1282.     AuthIdentity                     identity;
  1283.     long                             gReserved1;
  1284.     long                             gReserved2;
  1285.     long                             gReserved3;
  1286.     long                             clientData;
  1287.     CreationID                         directoryRecordCID;            /*  --> CreationID for the catalog */
  1288.     RecordIDPtr                     recordID;                    /*  --> recordID for the identity */
  1289.     RStringPtr                         password;                    /*  --> password in the catalog world */
  1290.     RStringPtr                         newPassword;                /*  --> new password in the catalog */
  1291. };
  1292. typedef struct OCESetupChangeDirectoryInfoPB OCESetupChangeDirectoryInfoPB;
  1293. /*
  1294. kOCESetupRemoveDirectoryInfo:
  1295. Using this call an existing identity for a catalog under LocalIdentity umbrella
  1296. can be changed.
  1297. ASCreateLocalIdentity should have been done succesfully before making this call.
  1298. directoryRecordCID -> is the record creationID obtained when DirAddOCEDirectory or
  1299. */
  1300.  
  1301. struct OCESetupRemoveDirectoryInfoPB {
  1302.     void *                            qLink;
  1303.     long                             reserved1;
  1304.     long                             reserved2;
  1305.     AuthIOCompletionUPP             ioCompletion;
  1306.     OSErr                             ioResult;
  1307.     unsigned long                     saveA5;
  1308.     short                             reqCode;
  1309.     long                             reserved[2];
  1310.     AddrBlock                         serverHint;
  1311.     short                             dsRefNum;
  1312.     unsigned long                     callID;
  1313.     AuthIdentity                     identity;
  1314.     long                             gReserved1;
  1315.     long                             gReserved2;
  1316.     long                             gReserved3;
  1317.     long                             clientData;
  1318.     CreationID                         directoryRecordCID;            /*  --> CreationID for the catalog */
  1319. };
  1320. typedef struct OCESetupRemoveDirectoryInfoPB OCESetupRemoveDirectoryInfoPB;
  1321. /*
  1322. kOCESetupGetDirectoryInfo:
  1323. Using this call info on an existing identity for a particular catalog under LocalIdentity umbrella
  1324. can be obtained.
  1325. For the specified catalog 'directoryName' and 'discriminator', rid and nativeName will
  1326. returned. Caller must provide appropriate buffer to get back rid and nativeName.
  1327. 'password' will be returned  for  non-ADAP Catalogs.
  1328. */
  1329.  
  1330. struct OCESetupGetDirectoryInfoPB {
  1331.     void *                            qLink;
  1332.     long                             reserved1;
  1333.     long                             reserved2;
  1334.     AuthIOCompletionUPP             ioCompletion;
  1335.     OSErr                             ioResult;
  1336.     unsigned long                     saveA5;
  1337.     short                             reqCode;
  1338.     long                             reserved[2];
  1339.     AddrBlock                         serverHint;
  1340.     short                             dsRefNum;
  1341.     unsigned long                     callID;
  1342.     AuthIdentity                     identity;
  1343.     long                             gReserved1;
  1344.     long                             gReserved2;
  1345.     long                             gReserved3;
  1346.     long                             clientData;
  1347.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  1348.     DirDiscriminator                 discriminator;                /*  --> discriminator for the catalog */
  1349.     RecordIDPtr                     recordID;                    /* <--  rid for the catalog identity */
  1350.     RStringPtr                         nativeName;                    /* <--  user name in the catalog world */
  1351.     RStringPtr                         password;                    /* <--  password in the catalog world */
  1352. };
  1353. typedef struct OCESetupGetDirectoryInfoPB OCESetupGetDirectoryInfoPB;
  1354. /*****************************************************************************
  1355.  
  1356.  
  1357.          Catalog Manager operations
  1358.  
  1359.  
  1360. *****************************************************************************/
  1361. typedef union DirParamBlock             DirParamBlock;
  1362.  
  1363. typedef DirParamBlock *                    DirParamBlockPtr;
  1364. typedef CALLBACK_API( void , DirIOCompletionProcPtr )(DirParamBlockPtr paramBlock);
  1365. /*
  1366.     WARNING: DirIOCompletionProcPtr uses register based parameters under classic 68k
  1367.              and cannot be written in a high-level language without 
  1368.              the help of mixed mode or assembly glue.
  1369. */
  1370. typedef REGISTER_UPP_TYPE(DirIOCompletionProcPtr)                 DirIOCompletionUPP;
  1371. /* AddRecord */
  1372.  
  1373. struct DirAddRecordPB {
  1374.     void *                            qLink;
  1375.     long                             reserved1;
  1376.     long                             reserved2;
  1377.     DirIOCompletionUPP                 ioCompletion;
  1378.     OSErr                             ioResult;
  1379.     unsigned long                     saveA5;
  1380.     short                             reqCode;
  1381.     long                             reserved[2];
  1382.     AddrBlock                         serverHint;
  1383.     short                             dsRefNum;
  1384.     unsigned long                     callID;
  1385.     AuthIdentity                     identity;
  1386.     long                             gReserved1;
  1387.     long                             gReserved2;
  1388.     long                             gReserved3;
  1389.     long                             clientData;
  1390.     RecordIDPtr                     aRecord;                    /*  --> CreationID returned here */
  1391.     Boolean                         allowDuplicate;                /*  --> */
  1392.     Boolean                         filler1;
  1393. };
  1394. typedef struct DirAddRecordPB            DirAddRecordPB;
  1395.  
  1396.  
  1397. /* DeleteRecord */
  1398.  
  1399. struct DirDeleteRecordPB {
  1400.     void *                            qLink;
  1401.     long                             reserved1;
  1402.     long                             reserved2;
  1403.     DirIOCompletionUPP                 ioCompletion;
  1404.     OSErr                             ioResult;
  1405.     unsigned long                     saveA5;
  1406.     short                             reqCode;
  1407.     long                             reserved[2];
  1408.     AddrBlock                         serverHint;
  1409.     short                             dsRefNum;
  1410.     unsigned long                     callID;
  1411.     AuthIdentity                     identity;
  1412.     long                             gReserved1;
  1413.     long                             gReserved2;
  1414.     long                             gReserved3;
  1415.     long                             clientData;
  1416.     RecordIDPtr                     aRecord;                    /*  --> */
  1417. };
  1418. typedef struct DirDeleteRecordPB        DirDeleteRecordPB;
  1419. /* aRecord must contain valid PackedRLI and a CreationID. */
  1420.  
  1421.  
  1422. /**********************************************************************************/
  1423. /*
  1424. DirEnumerate:
  1425. This call can be used to enumerate both DNodes and records under a specified
  1426. DNode. A DNode is specified by the PackedRLIPtr 'aRLI'.
  1427.  
  1428. startingPoint indicates where to start the enumeration.  Initially,
  1429. it should be set to a value of nil.  After some records are enumerated,
  1430. the client can issue the call again with the same aRLI and recordName and
  1431. typeList. The last received DirEnumSpec in the startingPoint field.  The server
  1432. will continue the enumeration from that record on. if user wants to get back the
  1433. value specified in the startingRecord also, the Boolean 'includeStartingPoint'
  1434. must be set to 'true'. If this is set to 'false', records specified after the
  1435. startingPoint record will be returned.
  1436.  
  1437. sortBy indicates to the server to return the records that match in name-first
  1438. or type-first order.  sortDirection indicates to the server to search in forward
  1439. or backward sort order for RecordIDs Specified.
  1440.  
  1441. RecordIDS and Enumeration Criteria:
  1442.  
  1443. PackedRLIPtr parameter 'aRLI' will be accepted for DNode
  1444. specification.
  1445.  
  1446. One RStringPtr 'nameMatchString' is provided. User is allowed to
  1447. specify a wild card in the name. WildCard specification is specified in 
  1448. matchNameHow parameter and possible values are defined in DirMatchWith Enum.
  1449.  
  1450. 'typeCount' parameter indicate how many types are in the 'typeList'.
  1451.  
  1452. 'typeList' parmeter is a pointer to an RString array of size 'typeCount'.
  1453.  
  1454. If 'typeCount' is exactly equal to one, a wild card can be specified
  1455. for the entity type; otherwise types have to be completely specified.
  1456. WildCard specification is specified in  matchNameHow parameter
  1457.  and possible values are defined in DirMatchWith Enum.
  1458.  
  1459.  
  1460. A nil value for 'startingPoint' is allowed when sortDirection specified
  1461. is 'kSortBackwards'. This was not allowed previously.
  1462.  
  1463. 'enumFlags' parameter is a bit field. The following bits can be set:
  1464.     kEnumDistinguishedNameMask to get back records in the cluster data base.
  1465.     kEnumAliasMask to get back record aliases
  1466.     kEnumPseudonymMask to get back record pseudonyms
  1467.     kEnumDNodeMask to get back any children dNodes for the DNode specified in the
  1468.     'aRLI' parameter.
  1469.     kEnumForeignDNodeMask to get back any children dNodes which have ForeignDnodes in the
  1470.     dNode specified in the 'aRLI' parameter.
  1471.  
  1472.     kEnumAll is combination of all five values and can be used to enumerate
  1473.     everything under a specified DNode.
  1474.  
  1475.  
  1476.  
  1477. The results returned for each element will consist of a DirEnumSpec.
  1478. The DirEnumSpec contains 'enumFlag' which indicates the type of entity and a
  1479. union which will have either DNodeID or LocalRecordID depending on the value of 'enumFlag'.
  1480. The 'enumFlag'  will indicate whether the returned element is a
  1481. record(kEnumDistinguishedNameMask bit) or a alias(kEnumAliasMask bit) or a
  1482. Pseudonym(kEnumPseudonymMask) or a child DNode(kEnumDNodeMask bit).  If the 'enumFlag' value
  1483. is kEnumDnodeMask, it indicates the value returned in the union is a DNodeID (i.e. 'dNodeNumber'
  1484. is the 'dNodeNumber' of the child dnode(if the catalog supports dNodeNumbers, otherwise
  1485. this will be set to zero). The name will be the child dnode name. For other values of the
  1486. 'enumFlag', the value in the union will be LocalRecordID. In addition to kEnumDnodeMask it is
  1487. possible that kEnumForeignDNodeMask is also set. This is an advisory bit and application must make
  1488. it's own decision before displaying these records. If catalog supports kSupportIndexRatioMask, it
  1489. may also return the relative position of the record (percentile of total records) in the 
  1490. indexRatio field in EnumSpec.
  1491.  
  1492.  
  1493. responseSLRV will contain the script, language, region and version of the oce sorting software.
  1494. The results will be collected in the 'getBuffer' supplied by the user.
  1495. If buffer can not hold all the data returned 'kOCEMoreData' error will be returned.
  1496.  
  1497. If user receives 'noErr' or 'kOCEMoreData', buffer will contain valid results. A user
  1498. can extract the results in the 'getBuffer' by making DirEnumerateParse' call.
  1499. */
  1500.  
  1501.  
  1502. struct DirEnumerateGetPB {
  1503.     void *                            qLink;
  1504.     long                             reserved1;
  1505.     long                             reserved2;
  1506.     DirIOCompletionUPP                 ioCompletion;
  1507.     OSErr                             ioResult;
  1508.     unsigned long                     saveA5;
  1509.     short                             reqCode;
  1510.     long                             reserved[2];
  1511.     AddrBlock                         serverHint;
  1512.     short                             dsRefNum;
  1513.     unsigned long                     callID;
  1514.     AuthIdentity                     identity;
  1515.     long                             gReserved1;
  1516.     long                             gReserved2;
  1517.     long                             gReserved3;
  1518.     long                             clientData;
  1519.     PackedRLIPtr                     aRLI;                        /*  --> an RLI specifying the cluster to be enumerated */
  1520.     DirEnumSpec *                    startingPoint;                /*  --> */
  1521.     DirSortOption                     sortBy;                        /*  --> */
  1522.     DirSortDirection                 sortDirection;                /*  --> */
  1523.     long                             dReserved;                    /*  --  */
  1524.     RStringPtr                         nameMatchString;            /*  --> name from which enumeration should start */
  1525.     RStringPtr *                    typesList;                    /*  --> list of entity types to be enumerated */
  1526.     unsigned long                     typeCount;                    /*  --> number of types in the list */
  1527.     DirEnumChoices                     enumFlags;                    /*  --> indicates what to enumerate */
  1528.     Boolean                         includeStartingPoint;        /*  --> if true return the record specified in starting point */
  1529.     Byte                             padByte;
  1530.     DirMatchWith                     matchNameHow;                /*  --> Matching Criteria for nameMatchString */
  1531.     DirMatchWith                     matchTypeHow;                /*  --> Matching Criteria for typeList */
  1532.     void *                            getBuffer;                    /*  --> */
  1533.     unsigned long                     getBufferSize;                /*  --> */
  1534.     SLRV                             responseSLRV;                /*  <--  response SLRV */
  1535. };
  1536. typedef struct DirEnumerateGetPB        DirEnumerateGetPB;
  1537. /* The EnumerateRecords call-back function is defined as follows: */
  1538. typedef CALLBACK_API( Boolean , ForEachDirEnumSpecProcPtr )(long clientData, const DirEnumSpec *enumSpec);
  1539. typedef STACK_UPP_TYPE(ForEachDirEnumSpecProcPtr)                 ForEachDirEnumSpecUPP;
  1540.  
  1541. typedef ForEachDirEnumSpecUPP             ForEachDirEnumSpec;
  1542. /*
  1543. EnumerateParse:
  1544. After an EnumerateGet call has completed, call EnumerateParse
  1545. to parse through the buffer that was filled in EnumerateGet.
  1546.  
  1547. 'eachEnumSpec' will be called each time to return to the client a
  1548. DirEnumSpec that matches the pattern for enumeration. 'enumFlag' indicates the type
  1549. of information returned in the DirEnumSpec
  1550. The clientData parameter that you pass in the parameter block will be passed
  1551. to 'forEachEnumDSSpecFunc'.  You are free to put anything in clientData - it is intended
  1552. to allow you some way to match the call-back to the original call (for
  1553. example, you make more then one aysynchronous EnumerateGet calls and you want to
  1554. associate returned results in some way).
  1555.  
  1556. The client should return FALSE from 'eachEnumSpec' to continue
  1557. processing of the EnumerateParse request.  Returning TRUE will
  1558. terminate the EnumerateParse request.
  1559.  
  1560. For synchronous calls, the call-back routine actually runs as part of the same thread
  1561. of execution as the thread that made the EnumerateParse call.  That means that the
  1562. same low-memory globals, A5, stack, etc. are in effect during the call-back
  1563. that were in effect when the call was made.  Because of this, the call-back
  1564. routine has the same restrictions as the caller of EnumerateParse:
  1565. if EnumerateParse was not called from interrupt level, then the call-
  1566. back routine can allocate memory. For asynchronous calls, call-back routine is
  1567. like a ioCompletion except that A5 will be preserved for the application.
  1568. */
  1569.  
  1570. struct DirEnumerateParsePB {
  1571.     void *                            qLink;
  1572.     long                             reserved1;
  1573.     long                             reserved2;
  1574.     DirIOCompletionUPP                 ioCompletion;
  1575.     OSErr                             ioResult;
  1576.     unsigned long                     saveA5;
  1577.     short                             reqCode;
  1578.     long                             reserved[2];
  1579.     AddrBlock                         serverHint;
  1580.     short                             dsRefNum;
  1581.     unsigned long                     callID;
  1582.     AuthIdentity                     identity;
  1583.     long                             gReserved1;
  1584.     long                             gReserved2;
  1585.     long                             gReserved3;
  1586.     long                             clientData;
  1587.     PackedRLIPtr                     aRLI;                        /*  --> an RLI specifying the cluster to be enumerated */
  1588.     long                             bReserved;                    /*  --  */
  1589.     long                             cReserved;                    /*  --  */
  1590.     ForEachDirEnumSpec                 eachEnumSpec;                /*  --> */
  1591.     long                             eReserved;                    /*  --  */
  1592.     long                             fReserved;                    /*  --  */
  1593.     long                             gReserved;                    /*  --  */
  1594.     long                             hReserved;                    /*  --  */
  1595.     long                             iReserved;                    /*  --  */
  1596.     void *                            getBuffer;                    /*  --> */
  1597.     unsigned long                     getBufferSize;                /*  --> */
  1598.     short                             l1Reserved;                    /*  -- */
  1599.     short                             l2Reserved;                    /*  --  */
  1600.     short                             l3Reserved;                    /*  -- */
  1601.     short                             l4Reserved;                    /*  --  */
  1602.  
  1603. };
  1604. typedef struct DirEnumerateParsePB        DirEnumerateParsePB;
  1605. /*
  1606.  * FindRecordGet operates similarly to DirEnumerate except it returns a list
  1607.  * of records instead of records local to a cluster.
  1608. */
  1609.  
  1610. struct DirFindRecordGetPB {
  1611.     void *                            qLink;
  1612.     long                             reserved1;
  1613.     long                             reserved2;
  1614.     DirIOCompletionUPP                 ioCompletion;
  1615.     OSErr                             ioResult;
  1616.     unsigned long                     saveA5;
  1617.     short                             reqCode;
  1618.     long                             reserved[2];
  1619.     AddrBlock                         serverHint;
  1620.     short                             dsRefNum;
  1621.     unsigned long                     callID;
  1622.     AuthIdentity                     identity;
  1623.     long                             gReserved1;
  1624.     long                             gReserved2;
  1625.     long                             gReserved3;
  1626.     long                             clientData;
  1627.     RecordIDPtr                     startingPoint;
  1628.     long                             reservedA[2];
  1629.     RStringPtr                         nameMatchString;
  1630.     RStringPtr *                    typesList;
  1631.     unsigned long                     typeCount;
  1632.     long                             reservedB;
  1633.     short                             reservedC;
  1634.     DirMatchWith                     matchNameHow;
  1635.     DirMatchWith                     matchTypeHow;
  1636.     void *                            getBuffer;
  1637.     unsigned long                     getBufferSize;
  1638.     DirectoryNamePtr                 directoryName;
  1639.     DirDiscriminator                 discriminator;
  1640. };
  1641. typedef struct DirFindRecordGetPB        DirFindRecordGetPB;
  1642. /* The FindRecordParse call-back function is defined as follows: */
  1643. typedef CALLBACK_API( Boolean , ForEachRecordProcPtr )(long clientData, const DirEnumSpec *enumSpec, PackedRLIPtr pRLI);
  1644. typedef STACK_UPP_TYPE(ForEachRecordProcPtr)                     ForEachRecordUPP;
  1645.  
  1646. typedef ForEachRecordUPP                 ForEachRecord;
  1647. /*
  1648.  * This PB same as DirFindRecordGet except it includes the callback function
  1649. */
  1650.  
  1651. struct DirFindRecordParsePB {
  1652.     void *                            qLink;
  1653.     long                             reserved1;
  1654.     long                             reserved2;
  1655.     DirIOCompletionUPP                 ioCompletion;
  1656.     OSErr                             ioResult;
  1657.     unsigned long                     saveA5;
  1658.     short                             reqCode;
  1659.     long                             reserved[2];
  1660.     AddrBlock                         serverHint;
  1661.     short                             dsRefNum;
  1662.     unsigned long                     callID;
  1663.     AuthIdentity                     identity;
  1664.     long                             gReserved1;
  1665.     long                             gReserved2;
  1666.     long                             gReserved3;
  1667.     long                             clientData;
  1668.     RecordIDPtr                     startingPoint;
  1669.     long                             reservedA[2];
  1670.     RStringPtr                         nameMatchString;
  1671.     RStringPtr *                    typesList;
  1672.     unsigned long                     typeCount;
  1673.     long                             reservedB;
  1674.     short                             reservedC;
  1675.     DirMatchWith                     matchNameHow;
  1676.     DirMatchWith                     matchTypeHow;
  1677.     void *                            getBuffer;
  1678.     unsigned long                     getBufferSize;
  1679.     DirectoryNamePtr                 directoryName;
  1680.     DirDiscriminator                 discriminator;
  1681.     ForEachRecord                     forEachRecordFunc;
  1682.  
  1683. };
  1684. typedef struct DirFindRecordParsePB        DirFindRecordParsePB;
  1685.  
  1686.  
  1687. /*
  1688. LookupGet:
  1689.  
  1690. aRecordList is an array of pointers to RecordIDs, each of which must
  1691. contain valid PackedRLI and a CreationID.  recordIDCount is
  1692. the size of this array.
  1693.  
  1694. attrTypeList is an array of pointers to AttributeTypes.  attrTypeCount is
  1695. the size of this array.
  1696.  
  1697. staringRecordIndex is the record from which to continue the lookup.
  1698. If you want to start from first record in the list, this must be 1 (not zero).
  1699. This value must always be <= recordIDCount.
  1700.  
  1701. startingAttributeIndex is the AttributeType from which we want to continue the lookup.
  1702. If you want to start from first attribute in the list, this must be 1 (not zero).
  1703. This value must always be <= attrTypeCount.
  1704.  
  1705. startingAttribute is the value of the attribute value from which we want to
  1706. continue lookup. In case of catalogs supporting creationIDs, startingAttribute
  1707. may contain only a CID. Other catalogs may require the entire value.
  1708. If a non-null cid is given and if an attribute value with that cid is not found, this
  1709. call will terminate with kOCENoSuchAttribute error. A client should not make a LookupParse call
  1710. after getting this error.
  1711.  
  1712. 'includeStartingPoint' boolean can be set to 'true' to receive the value specified in the
  1713. startingPoint in the results returned. If this is set to 'false', the value
  1714. specified in the startingAttribute will not be returned.
  1715.  
  1716. When LookupGet call fails with kOCEMoreData, the client will be able to find out where the call ended
  1717. with a subsequent LookupParse call. When the LookupParse call completes with kOCEMoreData,
  1718. lastRecordIndex, lastAttributeIndex and lastValueCID will point to the corresponding
  1719. recordID, attributeType and the CreationID of the last value returned successfully. These parameters
  1720. are exactly the same ones for the startingRecordIndex, startingAttributeIndex, and startingAttrValueCID
  1721. so they can be used in a subsequent LookupGet call to continue the lookup.
  1722.  
  1723. In an extreme case, It is possible that we had an attribute value that is too large to fit
  1724. in the client's buffer. In such cases, if it was the only thing that we tried to fit
  1725. into the buffer, the client will not able to proceed further because he will not know the
  1726. attributeCID of the attribute to continue with.  Also he does not know how big a buffer
  1727. would be needed for the next call to get this 'mondo' attribute value successfully.
  1728.  
  1729. to support this, LookupParse call will do the following:
  1730.  
  1731. If LookupGet has failed with kOCEMoreData error, LookupParse will check to make sure that
  1732. ForEachAttributeValueFunc has been called at least once. If so, the client has the option
  1733. to continue from that attribute CreationID (for PAB/ADAP) in the next LookupGet call.
  1734. However, if it was not even called once, then the attribute value may be too big to fit in the
  1735. user's buffer. In this case, lastAttrValueCID (lastAttribute) and attrSize are returned in the
  1736. parse buffer and the call will fail with kOCEMoreAttrValue. However, it is possible that
  1737. ForEachAttributeValue was not called because the user does not have read access to some of
  1738. the attributeTypes in the list, and the buffer was full before even reading the creationID of
  1739. any of the attribute values.  A kOCEMoreData error is returned.
  1740.  
  1741. The Toolbox will check for duplicate RecordIDs in the aRecordList. If found, it will return
  1742. 'daDuplicateRecordIDErr'.
  1743.  
  1744. The Toolbox will check for duplicate AttributeTypes in the attrTypeList. If found it will
  1745. return 'daDuplicateAttrTypeErr'.
  1746. */
  1747.  
  1748. struct DirLookupGetPB {
  1749.     void *                            qLink;
  1750.     long                             reserved1;
  1751.     long                             reserved2;
  1752.     DirIOCompletionUPP                 ioCompletion;
  1753.     OSErr                             ioResult;
  1754.     unsigned long                     saveA5;
  1755.     short                             reqCode;
  1756.     long                             reserved[2];
  1757.     AddrBlock                         serverHint;
  1758.     short                             dsRefNum;
  1759.     unsigned long                     callID;
  1760.     AuthIdentity                     identity;
  1761.     long                             gReserved1;
  1762.     long                             gReserved2;
  1763.     long                             gReserved3;
  1764.     long                             clientData;
  1765.     RecordIDPtr *                    aRecordList;                /*  --> an array of RecordID pointers */
  1766.     AttributeTypePtr *                attrTypeList;                /*  --> an array of attribute types */
  1767.     long                             cReserved;                    /*  --  */
  1768.     long                             dReserved;                    /*  --  */
  1769.     long                             eReserved;                    /*  --  */
  1770.     long                             fReserved;                    /*  --  */
  1771.     unsigned long                     recordIDCount;                /*  --> */
  1772.     unsigned long                     attrTypeCount;                /*  --> */
  1773.     Boolean                         includeStartingPoint;        /*  --> if true return the value specified by the starting indices */
  1774.     Byte                             padByte;
  1775.     short                             i1Reserved;                    /*  --  */
  1776.     void *                            getBuffer;                    /*  --> */
  1777.     unsigned long                     getBufferSize;                /*  --> */
  1778.     unsigned long                     startingRecordIndex;        /*  --> start from this record */
  1779.     unsigned long                     startingAttrTypeIndex;        /*  --> start from this attribute type */
  1780.     Attribute                         startingAttribute;            /*  --> start from this attribute value */
  1781.     long                             pReserved;                    /*  --  */
  1782. };
  1783. typedef struct DirLookupGetPB            DirLookupGetPB;
  1784. /* The Lookup call-back functions are defined as follows: */
  1785. typedef CALLBACK_API( Boolean , ForEachLookupRecordIDProcPtr )(long clientData, const RecordID *recordID);
  1786. typedef STACK_UPP_TYPE(ForEachLookupRecordIDProcPtr)             ForEachLookupRecordIDUPP;
  1787.  
  1788. typedef ForEachLookupRecordIDUPP         ForEachLookupRecordID;
  1789. typedef CALLBACK_API( Boolean , ForEachAttrTypeLookupProcPtr )(long clientData, const AttributeType *attrType, AccessMask myAttrAccMask);
  1790. typedef STACK_UPP_TYPE(ForEachAttrTypeLookupProcPtr)             ForEachAttrTypeLookupUPP;
  1791. typedef ForEachAttrTypeLookupUPP         ForEachAttrTypeLookup;
  1792. typedef CALLBACK_API( Boolean , ForEachAttrValueProcPtr )(long clientData, const Attribute *attribute);
  1793. typedef STACK_UPP_TYPE(ForEachAttrValueProcPtr)                 ForEachAttrValueUPP;
  1794. typedef ForEachAttrValueUPP             ForEachAttrValue;
  1795. /*
  1796. LookupParse:
  1797.  
  1798. After a LookupGet call has completed, call LookupParse
  1799. to parse through the buffer that was filled in LookupGet.  The
  1800. toolbox will parse through the buffer and call the appropriate call-back routines
  1801. for each item in the getBuffer.
  1802.  
  1803. 'eachRecordID' will be called each time to return to the client one of the
  1804. RecordIDs from aRecordList.  The clientData parameter that you
  1805. pass in the parameter block will be passed to eachRecordID.
  1806. You are free to put anything in clientData - it is intended to allow
  1807. you some way to match the call-back to the original call (in case, for
  1808. example, you make simultaneous asynchronous LookupGet calls).  If you don't
  1809. want to get a call-back for each RecordID (for example, if you're looking up
  1810. attributes for only one RecordID), pass nil for eachRecordID.
  1811.  
  1812. After forEachLocalRecordIDFunc is called, eachAttrType may be called to pass an
  1813. attribute type (one from attrTypeList) that exists in the record specified
  1814. in the last eachRecordID call.  If you don't want to get a call-back for
  1815. each AttributeType (for example, if you're looking up only one attribute type,
  1816. or you prefer to read the type from the Attribute struct during the eachAttrValue
  1817. call-back routine), pass nil for eachAttrType. However access controls may
  1818. prohibit you from reading some attribute types; in that case eachAttrValue
  1819. may not be called even though the value exists. Hence the client should
  1820. supply this call-back function to see the access controls for each attribute type.
  1821.  
  1822. This will be followed by one or more calls to eachAttrValue, to pass the
  1823. type, tag, and attribute value.  NOTE THIS CHANGE:  you are no longer expected to
  1824. pass a pointer to a buffer in which to put the value.  Now you get a pointer to
  1825. the value, and you can process it within the call-back routine.
  1826. After one or more values are returned, eachAttrType may be called again to pass
  1827. another attribute type that exists in the last-specified RecordID.
  1828.  
  1829. The client should return FALSE from eachRecordID, eachAttrType, and
  1830. eachAttrValue to continue processing of the LookupParse request.  Returning TRUE
  1831. from any call-back will terminate the LookupParse request.
  1832.  
  1833. If LookupGet has failed with kOCEMoreData error, LookupParse will check to make sure that
  1834. ForEachAttributeValueFunc has been called at least once. If so, the client has the option
  1835. to continue from that attribute CreationID (for PAB/ADAP) in the next LookupGet call.
  1836. However, if it was not even called once, then the attribute value may be too big to fit in the
  1837. user's buffer. In this case, lastAttrValueCID (lastAttribute) and attrSize are returned in the
  1838. parse buffer and the call will fail with kOCEMoreAttrValue. However, it is possible that
  1839. ForEachAttributeValue was not called because the user does not have read access to some of
  1840. the attributeTypes in the list, and the buffer was full before even reading the creationID of
  1841. any of the attribute values.  A kOCEMoreData error is returned.
  1842.  
  1843. For synchronous calls, the call-back routine actually runs as part of the same thread
  1844. of execution as the thread that made the LookupParse call.  That means that the
  1845. same low-memory globals, A5, stack, etc. are in effect during the call-back
  1846. that were in effect when the call was made.  Because of this, the call-back
  1847. routine has the same restrictions as the caller of LookupParse:
  1848. if LookupParse was not called from interrupt level, then the call-
  1849. back routine can allocate memory. For asynchronous calls, call-back routine is
  1850. like a ioCompletion except that A5 will be preserved for the application.
  1851. */
  1852.  
  1853. struct DirLookupParsePB {
  1854.     void *                            qLink;
  1855.     long                             reserved1;
  1856.     long                             reserved2;
  1857.     DirIOCompletionUPP                 ioCompletion;
  1858.     OSErr                             ioResult;
  1859.     unsigned long                     saveA5;
  1860.     short                             reqCode;
  1861.     long                             reserved[2];
  1862.     AddrBlock                         serverHint;
  1863.     short                             dsRefNum;
  1864.     unsigned long                     callID;
  1865.     AuthIdentity                     identity;
  1866.     long                             gReserved1;
  1867.     long                             gReserved2;
  1868.     long                             gReserved3;
  1869.     long                             clientData;
  1870.     RecordIDPtr *                    aRecordList;                /*  --> must be same from the corresponding Get call */
  1871.     AttributeTypePtr *                attrTypeList;                /*  --> must be same from the corresponding Get call */
  1872.     long                             cReserved;                    /*  --  */
  1873.     ForEachLookupRecordID             eachRecordID;                /*  --> */
  1874.     ForEachAttrTypeLookup             eachAttrType;                /*  --> */
  1875.     ForEachAttrValue                 eachAttrValue;                /*  --> */
  1876.     unsigned long                     recordIDCount;                /*  --> must be same from the corresponding Get call */
  1877.     unsigned long                     attrTypeCount;                /*  --> must be same from the corresponding Get call */
  1878.     long                             iReserved;                    /*  --  */
  1879.     void *                            getBuffer;                    /*  --> must be same from the corresponding Get call*/
  1880.     unsigned long                     getBufferSize;                /*  --> must be same from the corresponding Get call*/
  1881.     unsigned long                     lastRecordIndex;            /* <--  last RecordID processed when parse completed */
  1882.     unsigned long                     lastAttributeIndex;            /* <--  last Attribute Type processed when parse completed */
  1883.     Attribute                         lastAttribute;                /* <--  last attribute value (with this CreationID) processed when parse completed */
  1884.     unsigned long                     attrSize;                    /* <--  length of the attribute we did not return */
  1885. };
  1886. typedef struct DirLookupParsePB            DirLookupParsePB;
  1887.  
  1888.  
  1889. /* AddAttributeValue */
  1890.  
  1891. struct DirAddAttributeValuePB {
  1892.     void *                            qLink;
  1893.     long                             reserved1;
  1894.     long                             reserved2;
  1895.     DirIOCompletionUPP                 ioCompletion;
  1896.     OSErr                             ioResult;
  1897.     unsigned long                     saveA5;
  1898.     short                             reqCode;
  1899.     long                             reserved[2];
  1900.     AddrBlock                         serverHint;
  1901.     short                             dsRefNum;
  1902.     unsigned long                     callID;
  1903.     AuthIdentity                     identity;
  1904.     long                             gReserved1;
  1905.     long                             gReserved2;
  1906.     long                             gReserved3;
  1907.     long                             clientData;
  1908.     RecordIDPtr                     aRecord;                    /*  --> */
  1909.     AttributePtr                     attr;                        /*  --> AttributeCreationID returned here */
  1910. };
  1911. typedef struct DirAddAttributeValuePB    DirAddAttributeValuePB;
  1912. /*
  1913. aRecord must contain valid PackedRLI and a CreationID.
  1914.  
  1915. Instead of passing type, length, and value in three separate
  1916. fields, we take a pointer to an Attribute structure that contains
  1917. all three, and has room for the AttributeCreationNumber.
  1918. The AttributeCreationID will be returned in the attr itself.
  1919.  
  1920. The AttributeTag tells the catalog service that the attribute is an RString,
  1921. binary, or a RecordID.
  1922. */
  1923. /*
  1924. DeleteAttributeType:
  1925. This call is provided so that an existing AttributeType can be deleted.
  1926. If any attribute values exist for this type, they will all be deleted
  1927. (if the user has access rights to delete the values) and then the attribute type
  1928. will be deleted. Otherwise dsAccessDenied error will be returned.
  1929. */
  1930.  
  1931. struct DirDeleteAttributeTypePB {
  1932.     void *                            qLink;
  1933.     long                             reserved1;
  1934.     long                             reserved2;
  1935.     DirIOCompletionUPP                 ioCompletion;
  1936.     OSErr                             ioResult;
  1937.     unsigned long                     saveA5;
  1938.     short                             reqCode;
  1939.     long                             reserved[2];
  1940.     AddrBlock                         serverHint;
  1941.     short                             dsRefNum;
  1942.     unsigned long                     callID;
  1943.     AuthIdentity                     identity;
  1944.     long                             gReserved1;
  1945.     long                             gReserved2;
  1946.     long                             gReserved3;
  1947.     long                             clientData;
  1948.     RecordIDPtr                     aRecord;                    /*  --> */
  1949.     AttributeTypePtr                 attrType;                    /*  --> */
  1950. };
  1951. typedef struct DirDeleteAttributeTypePB    DirDeleteAttributeTypePB;
  1952. /*
  1953.     DeleteAttributeValue
  1954. */
  1955.  
  1956. struct DirDeleteAttributeValuePB {
  1957.     void *                            qLink;
  1958.     long                             reserved1;
  1959.     long                             reserved2;
  1960.     DirIOCompletionUPP                 ioCompletion;
  1961.     OSErr                             ioResult;
  1962.     unsigned long                     saveA5;
  1963.     short                             reqCode;
  1964.     long                             reserved[2];
  1965.     AddrBlock                         serverHint;
  1966.     short                             dsRefNum;
  1967.     unsigned long                     callID;
  1968.     AuthIdentity                     identity;
  1969.     long                             gReserved1;
  1970.     long                             gReserved2;
  1971.     long                             gReserved3;
  1972.     long                             clientData;
  1973.     RecordIDPtr                     aRecord;                    /*  -> */
  1974.     AttributePtr                     attr;                        /*  -> */
  1975. };
  1976. typedef struct DirDeleteAttributeValuePB DirDeleteAttributeValuePB;
  1977.  
  1978.  
  1979. /*
  1980.     ChangeAttributeValue:
  1981.     currentAttr ==> the attribute to be changed. For ADAS and PAB CreationID is
  1982.                     sufficient
  1983.     newAttr     ==> new value for the attribute. For ADAS and PAB 
  1984.                     CreationID field will be set when
  1985.                     the call succeesfully completes
  1986.     
  1987.     aRecord     ==> must contain valid PackedRecordLocationInfo and a CreationID.
  1988.  
  1989.  
  1990.     
  1991. */
  1992.  
  1993. struct DirChangeAttributeValuePB {
  1994.     void *                            qLink;
  1995.     long                             reserved1;
  1996.     long                             reserved2;
  1997.     DirIOCompletionUPP                 ioCompletion;
  1998.     OSErr                             ioResult;
  1999.     unsigned long                     saveA5;
  2000.     short                             reqCode;
  2001.     long                             reserved[2];
  2002.     AddrBlock                         serverHint;
  2003.     short                             dsRefNum;
  2004.     unsigned long                     callID;
  2005.     AuthIdentity                     identity;
  2006.     long                             gReserved1;
  2007.     long                             gReserved2;
  2008.     long                             gReserved3;
  2009.     long                             clientData;
  2010.     RecordIDPtr                     aRecord;                    /*  -> */
  2011.     AttributePtr                     currentAttr;                /*  -> */
  2012.     AttributePtr                     newAttr;                    /*  -> */
  2013. };
  2014. typedef struct DirChangeAttributeValuePB DirChangeAttributeValuePB;
  2015.  
  2016. /* VerifyAttributeValue */
  2017.  
  2018. struct DirVerifyAttributeValuePB {
  2019.     void *                            qLink;
  2020.     long                             reserved1;
  2021.     long                             reserved2;
  2022.     DirIOCompletionUPP                 ioCompletion;
  2023.     OSErr                             ioResult;
  2024.     unsigned long                     saveA5;
  2025.     short                             reqCode;
  2026.     long                             reserved[2];
  2027.     AddrBlock                         serverHint;
  2028.     short                             dsRefNum;
  2029.     unsigned long                     callID;
  2030.     AuthIdentity                     identity;
  2031.     long                             gReserved1;
  2032.     long                             gReserved2;
  2033.     long                             gReserved3;
  2034.     long                             clientData;
  2035.     RecordIDPtr                     aRecord;                    /*  --> */
  2036.     AttributePtr                     attr;                        /*  --> */
  2037. };
  2038. typedef struct DirVerifyAttributeValuePB DirVerifyAttributeValuePB;
  2039. /*
  2040. aRecord must contain valid PackedRLI and a CreationID.
  2041.  
  2042. The attribute type and value are passed in the attribute structure.  If the
  2043. attribute CreationID is non-zero, the server will verify that an attribute with
  2044. the specified value and creation number exists in aRecord.  If the attribute
  2045. CreationID is zero, the server will verify the attribute by type and value
  2046. alone, and return the attribute CreationID in the Attribute struct if the
  2047. attribute exists.
  2048. */
  2049.  
  2050. /*
  2051. EnumerateAttributeTypesGet:
  2052. The following two calls can be used to enumerate the attribute types present in
  2053. a specified RecordID.  The first, EnumerateAttributeTypesGet, processes the request
  2054. and reads the response into getBuffer, as much as will fit.  A kOCEMoreData error will
  2055. be returned if the buffer was not large enough.  After this call completes, the
  2056. client can call EnumerateAttributeTypesParse (see below).
  2057.  
  2058. The user will able to continue from a startingPoint by setting a startingAttrType.
  2059. Typically, this should be the last value returned in EnumerateAttributeTypesParse call
  2060. when 'kOCEMoreData' is returned.
  2061.  
  2062. If 'includeStartingPoint' is true when a 'startingAttrType' is specified, the starting value
  2063. will be included in the results, if it exists. If this is set to false, this value will not
  2064. be included. AttributeTypes following this type will be returned.
  2065. */
  2066.  
  2067. struct DirEnumerateAttributeTypesGetPB {
  2068.     void *                            qLink;
  2069.     long                             reserved1;
  2070.     long                             reserved2;
  2071.     DirIOCompletionUPP                 ioCompletion;
  2072.     OSErr                             ioResult;
  2073.     unsigned long                     saveA5;
  2074.     short                             reqCode;
  2075.     long                             reserved[2];
  2076.     AddrBlock                         serverHint;
  2077.     short                             dsRefNum;
  2078.     unsigned long                     callID;
  2079.     AuthIdentity                     identity;
  2080.     long                             gReserved1;
  2081.     long                             gReserved2;
  2082.     long                             gReserved3;
  2083.     long                             clientData;
  2084.     RecordIDPtr                     aRecord;                    /*  --> */
  2085.     AttributeTypePtr                 startingAttrType;            /*  --> starting point */
  2086.     long                             cReserved;                    /*  --  */
  2087.     long                             dReserved;                    /*  --  */
  2088.     long                             eReserved;                    /*  --  */
  2089.     long                             fReserved;                    /*  --  */
  2090.     long                             gReserved;                    /*  --  */
  2091.     long                             hReserved;                    /*  --  */
  2092.     Boolean                         includeStartingPoint;        /*  --> if true return the attrType specified by starting point */
  2093.     Byte                             padByte;
  2094.     short                             i1Reserved;                    /*  --  */
  2095.     void *                            getBuffer;                    /*  --> */
  2096.     unsigned long                     getBufferSize;                /*  --> */
  2097. };
  2098. typedef struct DirEnumerateAttributeTypesGetPB DirEnumerateAttributeTypesGetPB;
  2099. /* The call-back function is defined as follows: */
  2100. typedef CALLBACK_API( Boolean , ForEachAttrTypeProcPtr )(long clientData, const AttributeType *attrType);
  2101. typedef STACK_UPP_TYPE(ForEachAttrTypeProcPtr)                     ForEachAttrTypeUPP;
  2102.  
  2103. typedef ForEachAttrTypeUPP                 ForEachAttrType;
  2104. /*
  2105. EnumerateAttributeTypesParse:
  2106. After an EnumerateAttributeTypesGet call has completed, call EnumerateAttributeTypesParse
  2107. to parse through the buffer that was filled in EnumerateAttributeTypesGet.  The
  2108. toolbox will parse through the buffer and call the call-back routine for
  2109. each attribute type in the getBuffer.
  2110.  
  2111. The client should return false from eachAttrType to continue
  2112. processing of the EnumerateAttributeTypesParse request.  Returning true will
  2113. terminate the EnumerateAttributeTypesParse request.  The clientData parameter that
  2114. you pass in the parameter block will be passed to eachAttrType.
  2115. You are free to put anything in clientData - it is intended to allow
  2116. you some way to match the call-back to the original call (in case, for
  2117. example, you make simultaneous asynchronous calls).
  2118.  
  2119. For synchronous calls, the call-back routine actually runs as part of the same thread
  2120. of execution as the thread that made the EnumerateAttributeTypesParse call.  That means that the
  2121. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2122. that were in effect when the call was made.  Because of this, the call-back
  2123. routine has the same restrictions as the caller of EnumerateAttributeTypesParse.
  2124. If EnumerateAttributeTypesParse was not called from interrupt level, then the call-
  2125. back routine can allocate memory. For asynchronous calls, call-back routine is
  2126. like a ioCompletion except that A5 will be preserved for the application.
  2127. */
  2128.  
  2129. struct DirEnumerateAttributeTypesParsePB {
  2130.     void *                            qLink;
  2131.     long                             reserved1;
  2132.     long                             reserved2;
  2133.     DirIOCompletionUPP                 ioCompletion;
  2134.     OSErr                             ioResult;
  2135.     unsigned long                     saveA5;
  2136.     short                             reqCode;
  2137.     long                             reserved[2];
  2138.     AddrBlock                         serverHint;
  2139.     short                             dsRefNum;
  2140.     unsigned long                     callID;
  2141.     AuthIdentity                     identity;
  2142.     long                             gReserved1;
  2143.     long                             gReserved2;
  2144.     long                             gReserved3;
  2145.     long                             clientData;
  2146.     RecordIDPtr                     aRecord;                    /*  --> Same as DirEnumerateAttributeTypesGetPB */
  2147.     long                             bReserved;                    /*  --  */
  2148.     long                             cReserved;                    /*  --  */
  2149.     long                             dReserved;                    /*  --  */
  2150.     ForEachAttrType                 eachAttrType;                /*  --> */
  2151.     long                             fReserved;                    /*  --  */
  2152.     long                             gReserved;                    /*  --  */
  2153.     long                             hReserved;                    /*  --  */
  2154.     long                             iReserved;                    /*  --  */
  2155.     void *                            getBuffer;                    /*  --> */
  2156.     unsigned long                     getBufferSize;                /*  --> */
  2157. };
  2158. typedef struct DirEnumerateAttributeTypesParsePB DirEnumerateAttributeTypesParsePB;
  2159. /*
  2160. DirAbort:
  2161. With this call a user will able to abort an outstanding catalog service call.
  2162. A user must pass a pointer to the parameter block for the outstanding call.
  2163. In the current version of the product, the toolbox will process this call
  2164. for NetSearchADAPDirectoriesGet or FindADAPDirectoryByNetSearch calls and if possible
  2165. it will abort. For other calls for ADAP and PAB this will return 'daAbortFailErr'.
  2166. For CSAM catalogs, this call will be passed to the corresponding CSAM driver.
  2167. The CSAM driver may process this call or may return 'daAbortFailErr'. This call can
  2168. be called only in synchronous mode. Since the abort call makes references to fields in
  2169. the pb associated with the original call, this pb must not be disposed or or altered if
  2170. the original call completes before the abort call has completed.
  2171. */
  2172.  
  2173. struct DirAbortPB {
  2174.     void *                            qLink;
  2175.     long                             reserved1;
  2176.     long                             reserved2;
  2177.     DirIOCompletionUPP                 ioCompletion;
  2178.     OSErr                             ioResult;
  2179.     unsigned long                     saveA5;
  2180.     short                             reqCode;
  2181.     long                             reserved[2];
  2182.     AddrBlock                         serverHint;
  2183.     short                             dsRefNum;
  2184.     unsigned long                     callID;
  2185.     AuthIdentity                     identity;
  2186.     long                             gReserved1;
  2187.     long                             gReserved2;
  2188.     long                             gReserved3;
  2189.     long                             clientData;
  2190.     DirParamBlock *                    pb;                            /*  --> pb for the call which must be aborted */
  2191. };
  2192. typedef struct DirAbortPB                DirAbortPB;
  2193.  
  2194. /*
  2195. AddPseudonym:
  2196. An alternate name and type can be added to a given record. If allowDuplicate
  2197. is set the name and type will be added even if the same name and type already
  2198. exists.
  2199. */
  2200.  
  2201. struct DirAddPseudonymPB {
  2202.     void *                            qLink;
  2203.     long                             reserved1;
  2204.     long                             reserved2;
  2205.     DirIOCompletionUPP                 ioCompletion;
  2206.     OSErr                             ioResult;
  2207.     unsigned long                     saveA5;
  2208.     short                             reqCode;
  2209.     long                             reserved[2];
  2210.     AddrBlock                         serverHint;
  2211.     short                             dsRefNum;
  2212.     unsigned long                     callID;
  2213.     AuthIdentity                     identity;
  2214.     long                             gReserved1;
  2215.     long                             gReserved2;
  2216.     long                             gReserved3;
  2217.     long                             clientData;
  2218.     RecordIDPtr                     aRecord;                    /*  --> RecordID to which pseudonym is to be added */
  2219.     RStringPtr                         pseudonymName;                /*  --> new name to be added as pseudonym */
  2220.     RStringPtr                         pseudonymType;                /*  --> new name to be added as pseudonym */
  2221.     Boolean                         allowDuplicate;                /*  --> */
  2222.     Boolean                         filler1;
  2223. };
  2224. typedef struct DirAddPseudonymPB        DirAddPseudonymPB;
  2225. /*
  2226. DeletePseudonym:
  2227. An alternate name and type for a given record can be deleted.
  2228. */
  2229.  
  2230. struct DirDeletePseudonymPB {
  2231.     void *                            qLink;
  2232.     long                             reserved1;
  2233.     long                             reserved2;
  2234.     DirIOCompletionUPP                 ioCompletion;
  2235.     OSErr                             ioResult;
  2236.     unsigned long                     saveA5;
  2237.     short                             reqCode;
  2238.     long                             reserved[2];
  2239.     AddrBlock                         serverHint;
  2240.     short                             dsRefNum;
  2241.     unsigned long                     callID;
  2242.     AuthIdentity                     identity;
  2243.     long                             gReserved1;
  2244.     long                             gReserved2;
  2245.     long                             gReserved3;
  2246.     long                             clientData;
  2247.     RecordIDPtr                     aRecord;                    /*  --> RecordID to which pseudonym to be added */
  2248.     RStringPtr                         pseudonymName;                /*  --> pseudonymName to be deleted */
  2249.     RStringPtr                         pseudonymType;                /*  --> pseudonymType to be deleted */
  2250. };
  2251. typedef struct DirDeletePseudonymPB        DirDeletePseudonymPB;
  2252.  
  2253. /*
  2254.     AddAlias:
  2255.     This call can be used to create an alias  record. The alias
  2256.     can be created either in the same or different cluster. ADAS will not support
  2257.     this call for this release. A new catalog capability flag 'kSupportsAlias' will indicate
  2258.     if the catalog supports this call. PAB's will support this call. For the PAB implementation,
  2259.     this call will create a record with the name and type specified an aRecord.
  2260.     This call works exactly like AddRecord.
  2261.     If 'allowDuplicate' is false and another record with same name and type already exists
  2262.     'daNoDupAllowed' error will be returned.
  2263. */
  2264.  
  2265. struct DirAddAliasPB {
  2266.     void *                            qLink;
  2267.     long                             reserved1;
  2268.     long                             reserved2;
  2269.     DirIOCompletionUPP                 ioCompletion;
  2270.     OSErr                             ioResult;
  2271.     unsigned long                     saveA5;
  2272.     short                             reqCode;
  2273.     long                             reserved[2];
  2274.     AddrBlock                         serverHint;
  2275.     short                             dsRefNum;
  2276.     unsigned long                     callID;
  2277.     AuthIdentity                     identity;
  2278.     long                             gReserved1;
  2279.     long                             gReserved2;
  2280.     long                             gReserved3;
  2281.     long                             clientData;
  2282.     RecordIDPtr                     aRecord;                    /*  -> */
  2283.     Boolean                         allowDuplicate;                /*  -> */
  2284.     Boolean                         filler1;
  2285. };
  2286. typedef struct DirAddAliasPB            DirAddAliasPB;
  2287. /*
  2288. DirFindValue:
  2289. This call can be used to find the occurrence of a value. The value
  2290. to be matched is passed in the buffer 'matchingData' field. The current
  2291. ADAP/PAB implementation will match a maximum of 32 bytes of data.
  2292. For attribute values in the PAB/ADAP implementation, only the first 32 bytes will
  2293. be used for comparing the occurrence of data. Search can be restricted to
  2294. a particular record and/or attribute type by specifying 'aRecord' or 'aType'.
  2295. After finding one occurrence, 'startingRecord' and 'startingAttribute'
  2296. can be specified to find the next occurrence of the same value.
  2297. 'sortDirection' can be specified with starting values to search forward or backward.
  2298. When a matching value is found, the 'recordFound' indicates the reccordID in which the
  2299. data occurrence was found, 'attributeFound' indicates the attribute with in which the
  2300. matching data was found. ADAP/PAB implementation returns only the type and creationID of
  2301. attributes. Catalogs which don't support creationIDs may return the
  2302. complete value; hence this call may need a buffer to hold the data. For ADAP/PAB implementations
  2303. the user has to make a DirLookup call to get the actual data. 'recordFound' and
  2304. 'attributeFound' can be used to initialize 'startingRecord' and 'startingAttribute' to
  2305. find the next occurrence of the value.
  2306. */
  2307.  
  2308. struct DirFindValuePB {
  2309.     void *                            qLink;
  2310.     long                             reserved1;
  2311.     long                             reserved2;
  2312.     DirIOCompletionUPP                 ioCompletion;
  2313.     OSErr                             ioResult;
  2314.     unsigned long                     saveA5;
  2315.     short                             reqCode;
  2316.     long                             reserved[2];
  2317.     AddrBlock                         serverHint;
  2318.     short                             dsRefNum;
  2319.     unsigned long                     callID;
  2320.     AuthIdentity                     identity;
  2321.     long                             gReserved1;
  2322.     long                             gReserved2;
  2323.     long                             gReserved3;
  2324.     long                             clientData;
  2325.     PackedRLIPtr                     aRLI;                        /*  --> an RLI specifying the cluster to be enumerated */
  2326.     LocalRecordIDPtr                 aRecord;                    /*  --> if not nil, look only in this record */
  2327.     AttributeTypePtr                 attrType;                    /*  --> if not nil, look only in this attribute type */
  2328.     LocalRecordIDPtr                 startingRecord;                /*  --> record in which to start searching */
  2329.     AttributePtr                     startingAttribute;            /*  --> attribute in which to start searching */
  2330.     LocalRecordIDPtr                 recordFound;                /* <--  record in which data was found */
  2331.     Attribute                         attributeFound;                /* <--  attribute in which data was found */
  2332.     unsigned long                     matchSize;                    /*  --> length of matching bytes */
  2333.     void *                            matchingData;                /*  --> data bytes to be matched in search */
  2334.     DirSortDirection                 sortDirection;                /*  --> sort direction (forwards or backwards) */
  2335. };
  2336. typedef struct DirFindValuePB            DirFindValuePB;
  2337.  
  2338.  
  2339. /*
  2340. EnumeratePseudonymGet:
  2341. This call can be used to enumerate the existing pseudonyms for
  2342. a given record specified in 'aRecord'. A starting point can be specified
  2343. by 'startingName' and 'startingType'. If the 'includeStartingPoint' boolean
  2344. is true and a starting point is specified, the name specified by startingName
  2345. and startingType also is returned in the results, if it exists. If this is set to false,
  2346. the pseudonym in startingName and Type is not included.
  2347. Pseudonyms returned in the 'getBuffer' can be extracted by making an
  2348. EnumeratePseudonymParse call. The results will consist of a RecordID with the
  2349. name and type of the pseudonym. If the buffer could not hold all the results, then
  2350. 'kOCEMoreData' error will be returned. The user will be able to continue the call by
  2351. using the last result returned as starting point for the next call.
  2352. */
  2353.  
  2354. struct DirEnumeratePseudonymGetPB {
  2355.     void *                            qLink;
  2356.     long                             reserved1;
  2357.     long                             reserved2;
  2358.     DirIOCompletionUPP                 ioCompletion;
  2359.     OSErr                             ioResult;
  2360.     unsigned long                     saveA5;
  2361.     short                             reqCode;
  2362.     long                             reserved[2];
  2363.     AddrBlock                         serverHint;
  2364.     short                             dsRefNum;
  2365.     unsigned long                     callID;
  2366.     AuthIdentity                     identity;
  2367.     long                             gReserved1;
  2368.     long                             gReserved2;
  2369.     long                             gReserved3;
  2370.     long                             clientData;
  2371.     RecordIDPtr                     aRecord;                    /*  --> */
  2372.     RStringPtr                         startingName;                /*  --> */
  2373.     RStringPtr                         startingType;                /*  --> */
  2374.     long                             dReserved;                    /*  --  */
  2375.     long                             eReserved;                    /*  --  */
  2376.     long                             fReserved;                    /*  --  */
  2377.     long                             gReserved;                    /*  --  */
  2378.     long                             hReserved;                    /*  --  */
  2379.     Boolean                         includeStartingPoint;        /*  --> if true return the Pseudonym specified by starting point will be included */
  2380.     Byte                             padByte;
  2381.     short                             i1Reserved;                    /*  --  */
  2382.     void *                            getBuffer;                    /*  --> */
  2383.     unsigned long                     getBufferSize;                /*  --> */
  2384. };
  2385. typedef struct DirEnumeratePseudonymGetPB DirEnumeratePseudonymGetPB;
  2386. /* The call-back function is defined as follows: */
  2387. typedef CALLBACK_API( Boolean , ForEachRecordIDProcPtr )(long clientData, const RecordID *recordID);
  2388. typedef STACK_UPP_TYPE(ForEachRecordIDProcPtr)                     ForEachRecordIDUPP;
  2389.  
  2390. typedef ForEachRecordIDUPP                 ForEachRecordID;
  2391. /*
  2392. EnumeratePseudonymParse:
  2393. The pseudonyms returned in the 'getBuffer' from the EnumeratePseudonymGet call
  2394. can be extracted by using the EnumeratePseudonymParse call. 'eachRecordID'
  2395. will be called for each pseudonym.
  2396.  
  2397. Returning true from any call-back will terminate the EnumeratePseudonymParse call.
  2398.  
  2399. For synchronous calls, the call-back routine actually runs as part of the same thread
  2400. of execution as the thread that made the EnumeratePseudonymParse call.  That means that the
  2401. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2402. that were in effect when the call was made.  Because of this, the call-back
  2403. routine has the same restrictions as the caller of EnumeratePseudonymParse:
  2404. if EnumeratePseudonymParse was not called from interrupt level, then the call-
  2405. back routine can allocate memory. For asynchronous calls, call-back routine is
  2406. like a ioCompletion except that A5 will be preserved for the application.
  2407. */
  2408.  
  2409. struct DirEnumeratePseudonymParsePB {
  2410.     void *                            qLink;
  2411.     long                             reserved1;
  2412.     long                             reserved2;
  2413.     DirIOCompletionUPP                 ioCompletion;
  2414.     OSErr                             ioResult;
  2415.     unsigned long                     saveA5;
  2416.     short                             reqCode;
  2417.     long                             reserved[2];
  2418.     AddrBlock                         serverHint;
  2419.     short                             dsRefNum;
  2420.     unsigned long                     callID;
  2421.     AuthIdentity                     identity;
  2422.     long                             gReserved1;
  2423.     long                             gReserved2;
  2424.     long                             gReserved3;
  2425.     long                             clientData;
  2426.     RecordIDPtr                     aRecord;                    /*  --> same as DirEnumerateAliasesGetPB */
  2427.     long                             bReserved;                    /*  --  */
  2428.     long                             cReserved;                    /*  --  */
  2429.     ForEachRecordID                 eachRecordID;                /*  --> */
  2430.     long                             eReserved;                    /*  --  */
  2431.     long                             fReserved;                    /*  --  */
  2432.     long                             gReserved;                    /*  --  */
  2433.     long                             hReserved;                    /*  --  */
  2434.     long                             iReserved;                    /*  --  */
  2435.     void *                            getBuffer;                    /*  --> */
  2436.     unsigned long                     getBufferSize;                /*  --> */
  2437. };
  2438. typedef struct DirEnumeratePseudonymParsePB DirEnumeratePseudonymParsePB;
  2439.  
  2440.  
  2441. /* GetNameAndType */
  2442.  
  2443. struct DirGetNameAndTypePB {
  2444.     void *                            qLink;
  2445.     long                             reserved1;
  2446.     long                             reserved2;
  2447.     DirIOCompletionUPP                 ioCompletion;
  2448.     OSErr                             ioResult;
  2449.     unsigned long                     saveA5;
  2450.     short                             reqCode;
  2451.     long                             reserved[2];
  2452.     AddrBlock                         serverHint;
  2453.     short                             dsRefNum;
  2454.     unsigned long                     callID;
  2455.     AuthIdentity                     identity;
  2456.     long                             gReserved1;
  2457.     long                             gReserved2;
  2458.     long                             gReserved3;
  2459.     long                             clientData;
  2460.     RecordIDPtr                     aRecord;                    /*  --> */
  2461. };
  2462. typedef struct DirGetNameAndTypePB        DirGetNameAndTypePB;
  2463. /*
  2464. aRecord must contain valid RLI and a CreationID.  It
  2465. must also contain pointers to maximum-length RStrings (name and type fields)
  2466. in which will be returned the record's distinguished name and type.
  2467. */
  2468.  
  2469. /*
  2470. SetNameAndType:
  2471. This call can be used to change a name and type for a record. The record
  2472. to be renamed is specified using 'aRecord'.
  2473. 'newName' and 'newType' indicate the name and type to be set.
  2474. 'allowDuplicate' if true indicates that name is to be set even if another
  2475. name and type exactly matches the newName and newType specified.
  2476.  
  2477. 'newName' and 'newType' are required since the catalogs not supporting
  2478. CreationID require name and type fields in the recordID to identify a given
  2479. record.
  2480. */
  2481.  
  2482. struct DirSetNameAndTypePB {
  2483.     void *                            qLink;
  2484.     long                             reserved1;
  2485.     long                             reserved2;
  2486.     DirIOCompletionUPP                 ioCompletion;
  2487.     OSErr                             ioResult;
  2488.     unsigned long                     saveA5;
  2489.     short                             reqCode;
  2490.     long                             reserved[2];
  2491.     AddrBlock                         serverHint;
  2492.     short                             dsRefNum;
  2493.     unsigned long                     callID;
  2494.     AuthIdentity                     identity;
  2495.     long                             gReserved1;
  2496.     long                             gReserved2;
  2497.     long                             gReserved3;
  2498.     long                             clientData;
  2499.     RecordIDPtr                     aRecord;                    /*  --> */
  2500.     Boolean                         allowDuplicate;                /*  --> */
  2501.     Byte                             padByte;
  2502.     RStringPtr                         newName;                    /*  --> new name for the record */
  2503.     RStringPtr                         newType;                    /*  --> new type for the record */
  2504. };
  2505. typedef struct DirSetNameAndTypePB        DirSetNameAndTypePB;
  2506.  
  2507.  
  2508.  
  2509. /*
  2510. DirGetMetaRecordInfo: This call can be made to obtain
  2511. the MetaRecordInfo for a given record. Information returned
  2512. is 16 bytes of OPAQUE information about the record.
  2513. */
  2514.  
  2515. struct DirGetRecordMetaInfoPB {
  2516.     void *                            qLink;
  2517.     long                             reserved1;
  2518.     long                             reserved2;
  2519.     DirIOCompletionUPP                 ioCompletion;
  2520.     OSErr                             ioResult;
  2521.     unsigned long                     saveA5;
  2522.     short                             reqCode;
  2523.     long                             reserved[2];
  2524.     AddrBlock                         serverHint;
  2525.     short                             dsRefNum;
  2526.     unsigned long                     callID;
  2527.     AuthIdentity                     identity;
  2528.     long                             gReserved1;
  2529.     long                             gReserved2;
  2530.     long                             gReserved3;
  2531.     long                             clientData;
  2532.     RecordIDPtr                     aRecord;                    /*  --> */
  2533.     DirMetaInfo                     metaInfo;                    /* <--  */
  2534. };
  2535. typedef struct DirGetRecordMetaInfoPB    DirGetRecordMetaInfoPB;
  2536.  
  2537. /*
  2538. DirGetDNodeMetaInfo: This call can be made to obtain
  2539. the DNodeMetaInfo for a given Packed RLI. Information returned
  2540. is 16 bytes of OPAQUE information about the DNode.
  2541. */
  2542.  
  2543. struct DirGetDNodeMetaInfoPB {
  2544.     void *                            qLink;
  2545.     long                             reserved1;
  2546.     long                             reserved2;
  2547.     DirIOCompletionUPP                 ioCompletion;
  2548.     OSErr                             ioResult;
  2549.     unsigned long                     saveA5;
  2550.     short                             reqCode;
  2551.     long                             reserved[2];
  2552.     AddrBlock                         serverHint;
  2553.     short                             dsRefNum;
  2554.     unsigned long                     callID;
  2555.     AuthIdentity                     identity;
  2556.     long                             gReserved1;
  2557.     long                             gReserved2;
  2558.     long                             gReserved3;
  2559.     long                             clientData;
  2560.     PackedRLIPtr                     pRLI;                        /*  --> */
  2561.     DirMetaInfo                     metaInfo;                    /* <--  */
  2562. };
  2563. typedef struct DirGetDNodeMetaInfoPB    DirGetDNodeMetaInfoPB;
  2564.  
  2565. /*
  2566. EnumerateDirectoriesGet:
  2567. A user can enumerate all the catalogs installed. This includes installed
  2568. ADAP and CSAM catalogs. The user can specify a signature as input to restrict
  2569. the results. kDirADAPKind will return only ADAP catalogs, kDirDSAMKind
  2570. will return all CSAM catalogs. kDirAllKinds will get both ADAP & CSAM catalogs.
  2571. A specific signature (e.g. X.500) may be used to get catalogs with an X.500 signature.
  2572. The information for each catalog returned will have directoryName, discriminator and features.
  2573.  
  2574. If the user receives 'noErr' or 'kOCEMoreData', the buffer will contain valid results. A user
  2575. can extract the results in the 'getBuffer' by making an DirEnumerateDirectories call.
  2576.  
  2577. If 'kOCEMoreData' is received, the user can continue enumeration by using the last catalog and
  2578. discriminator as startingDirectoryName and staringDirDiscriminator in the next call.
  2579.  
  2580. If 'includeStartingPoint' is true and a starting point is specified,
  2581. the staring point will be returned in the result. If false, it is not included.
  2582. */
  2583.  
  2584. struct DirEnumerateDirectoriesGetPB {
  2585.     void *                            qLink;
  2586.     long                             reserved1;
  2587.     long                             reserved2;
  2588.     DirIOCompletionUPP                 ioCompletion;
  2589.     OSErr                             ioResult;
  2590.     unsigned long                     saveA5;
  2591.     short                             reqCode;
  2592.     long                             reserved[2];
  2593.     AddrBlock                         serverHint;
  2594.     short                             dsRefNum;
  2595.     unsigned long                     callID;
  2596.     AuthIdentity                     identity;
  2597.     long                             gReserved1;
  2598.     long                             gReserved2;
  2599.     long                             gReserved3;
  2600.     long                             clientData;
  2601.     OCEDirectoryKind                 directoryKind;                /*  --> enumerate catalogs bearing this signature */
  2602.     DirectoryNamePtr                 startingDirectoryName;        /*  --> staring catalog name */
  2603.     DirDiscriminator                 startingDirDiscriminator;    /*  --> staring catalog discriminator */
  2604.     long                             eReserved;                    /*  --  */
  2605.     long                             fReserved;                    /*  --  */
  2606.     long                             gReserved;                    /*  --  */
  2607.     long                             hReserved;                    /*  --  */
  2608.     Boolean                         includeStartingPoint;        /*  --> if true return the catalog specified by starting point */
  2609.     Byte                             padByte;
  2610.     short                             i1Reserved;                    /*  --  */
  2611.     void *                            getBuffer;                    /*  --> */
  2612.     unsigned long                     getBufferSize;                /*  --> */
  2613. };
  2614. typedef struct DirEnumerateDirectoriesGetPB DirEnumerateDirectoriesGetPB;
  2615.  
  2616.  
  2617. typedef CALLBACK_API( Boolean , ForEachDirectoryProcPtr )(long clientData, const DirectoryName *dirName, const DirDiscriminator *discriminator, DirGestalt features);
  2618. typedef STACK_UPP_TYPE(ForEachDirectoryProcPtr)                 ForEachDirectoryUPP;
  2619.  
  2620. typedef ForEachDirectoryUPP             ForEachDirectory;
  2621. /*
  2622. EnumerateDirectoriesParse:
  2623. The catalog info returned in 'getBuffer' from the EnumerateDirectoriesGet call
  2624. can be extracted using the EnumerateDirectoriesParse call. 'eachDirectory' will
  2625. be called for each catalog.
  2626.  
  2627. Returning true from any call-back will terminate the EnumerateDirectoriesParse call.
  2628.  
  2629. For synchronous calls, the call-back routine actually runs as part of the same thread
  2630. of execution as the thread that made the EnumerateDirectoriesParse call.  That means that the
  2631. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2632. that were in effect when the call was made.  Because of this, the call-back
  2633. routine has the same restrictions as the caller of EnumerateDirectoriesParse:
  2634. if EnumerateDirectoriesParse was not called from interrupt level, then the call-
  2635. back routine can allocate memory. For asynchronous calls, call-back routine is
  2636. like a ioCompletion except that A5 will be preserved for the application.
  2637.  
  2638. eachDirectory will be called each time to return to the client a
  2639. DirectoryName, DirDiscriminator, and features for that catalog.
  2640. */
  2641.  
  2642. struct DirEnumerateDirectoriesParsePB {
  2643.     void *                            qLink;
  2644.     long                             reserved1;
  2645.     long                             reserved2;
  2646.     DirIOCompletionUPP                 ioCompletion;
  2647.     OSErr                             ioResult;
  2648.     unsigned long                     saveA5;
  2649.     short                             reqCode;
  2650.     long                             reserved[2];
  2651.     AddrBlock                         serverHint;
  2652.     short                             dsRefNum;
  2653.     unsigned long                     callID;
  2654.     AuthIdentity                     identity;
  2655.     long                             gReserved1;
  2656.     long                             gReserved2;
  2657.     long                             gReserved3;
  2658.     long                             clientData;
  2659.     long                             aReserved;                    /*  --  */
  2660.     long                             bReserved;                    /*  --  */
  2661.     long                             cReserved;                    /*  --  */
  2662.     long                             dReserved;                    /*  --  */
  2663.     ForEachDirectory                 eachDirectory;                /*  --> */
  2664.     long                             fReserved;                    /*  --  */
  2665.     long                             gReserved;                    /*  --  */
  2666.     long                             hReserved;                    /*  --  */
  2667.     long                             iReserved;                    /*  --  */
  2668.     void *                            getBuffer;                    /*  --> */
  2669.     unsigned long                     getBufferSize;                /*  --> */
  2670. };
  2671. typedef struct DirEnumerateDirectoriesParsePB DirEnumerateDirectoriesParsePB;
  2672.  
  2673. /*
  2674. The Following five call are specific to ADAP Catalogs. Toolbox
  2675. remembers a list of catalogs across boots. If any catalog service
  2676. call is intended for a ADAP catalog, then it must be in the list.
  2677. In order for managing this list, A client (Probably DE will use these
  2678. calls.
  2679. DirAddADAPDirectoryPB: Add a new ADAP catalog to the list.
  2680. DirRemoveADAPDirectory: Remove a ADAP catalog from the list.
  2681. DirNetSearchADAPDirectoriesGet:   search an internet for adas catalogs.
  2682. DirNetSearchADAPDirectoriesParse: extract the results obtained NetSearchADAPDirectoriesGet.
  2683. DirFindADAPDirectoryByNetSearch: Find a specified catalog through net search.
  2684. */
  2685. /*
  2686. NetSearchADAPDirectoriesGet:
  2687. This call can be used to make a network wide search for finding ADAP catalogs.
  2688. This call will be supported only by 'ADAP' and involve highly expensive
  2689. network operations, so the user is advised to use utmost discretion before
  2690. making this call. The results will be collected in the 'getbuffer' and can be
  2691. extracted using NetSearchADAPDirectoriesParse call. The directoryName,
  2692. the directoryDiscriminator, features and serverHint (AppleTalk address for
  2693. a PathFinder serving that catalog) are collected for each catalog found
  2694. on the network. If buffer is too small to hold all the catalogs found on
  2695. the network, a 'kOCEMoreData' error will be returned.
  2696. */
  2697.  
  2698. struct DirNetSearchADAPDirectoriesGetPB {
  2699.     void *                            qLink;
  2700.     long                             reserved1;
  2701.     long                             reserved2;
  2702.     DirIOCompletionUPP                 ioCompletion;
  2703.     OSErr                             ioResult;
  2704.     unsigned long                     saveA5;
  2705.     short                             reqCode;
  2706.     long                             reserved[2];
  2707.     AddrBlock                         serverHint;
  2708.     short                             dsRefNum;
  2709.     unsigned long                     callID;
  2710.     AuthIdentity                     identity;
  2711.     long                             gReserved1;
  2712.     long                             gReserved2;
  2713.     long                             gReserved3;
  2714.     long                             clientData;
  2715.     void *                            getBuffer;                    /*  --> */
  2716.     unsigned long                     getBufferSize;                /*  --> */
  2717.     long                             cReserved;                    /*  --  */
  2718. };
  2719. typedef struct DirNetSearchADAPDirectoriesGetPB DirNetSearchADAPDirectoriesGetPB;
  2720. typedef CALLBACK_API( Boolean , ForEachADAPDirectoryProcPtr )(long clientData, const DirectoryName *dirName, const DirDiscriminator *discriminator, DirGestalt features, AddrBlock serverHint);
  2721. typedef STACK_UPP_TYPE(ForEachADAPDirectoryProcPtr)             ForEachADAPDirectoryUPP;
  2722.  
  2723. typedef ForEachADAPDirectoryUPP         ForEachADAPDirectory;
  2724. /*
  2725. DirNetSearchADAPDirectoriesParse:
  2726. This call can be used to extract the results obtained in the 'getBuffer'.
  2727. The directoryName, directoryDiscriminator, features and
  2728. serverHint (AppleTalk address for a PathFinder serving that catalog) are
  2729. returned in each call-back. These values may be used to make an
  2730. AddADAPDirectory call.
  2731.  
  2732. Returning TRUE from any call-back will terminate the NetSearchADAPDirectoriesParse request.
  2733.  
  2734. For synchronous calls, the call-back routine actually runs as part of the same thread
  2735. of execution as the thread that made the DirNetSearchADAPDirectoriesParse call. That means that the
  2736. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2737. that were in effect when the call was made.  Because of this, the call-back
  2738. routine has the same restrictions as the caller of DirNetSearchADAPDirectoriesParse:
  2739. if DirNetSearchADAPDirectoriesParse was not called from interrupt level, then the call-
  2740. back routine can allocate memory. For asynchronous calls, call-back routine is
  2741. like a ioCompletion except that A5 will be preserved for the application.
  2742. */
  2743.  
  2744. struct DirNetSearchADAPDirectoriesParsePB {
  2745.     void *                            qLink;
  2746.     long                             reserved1;
  2747.     long                             reserved2;
  2748.     DirIOCompletionUPP                 ioCompletion;
  2749.     OSErr                             ioResult;
  2750.     unsigned long                     saveA5;
  2751.     short                             reqCode;
  2752.     long                             reserved[2];
  2753.     AddrBlock                         serverHint;
  2754.     short                             dsRefNum;
  2755.     unsigned long                     callID;
  2756.     AuthIdentity                     identity;
  2757.     long                             gReserved1;
  2758.     long                             gReserved2;
  2759.     long                             gReserved3;
  2760.     long                             clientData;
  2761.     void *                            getBuffer;                    /*  --> */
  2762.     unsigned long                     getBufferSize;                /*  --> */
  2763.     ForEachADAPDirectory             eachADAPDirectory;            /*  --> */
  2764. };
  2765. typedef struct DirNetSearchADAPDirectoriesParsePB DirNetSearchADAPDirectoriesParsePB;
  2766. /*
  2767. DirFindADAPDirectoryByNetSearch:
  2768. This call can be used to make a network wide search to find an ADAP catalog.
  2769. This call will be supported only by 'ADAP' and involves highly expensive
  2770. network operations, so the user is advised to use utmost discretion before
  2771. making this call. The catalog is specified using directoryName and discriminator.
  2772. If 'addToOCESetup' is true, the catalog will be automatically added to the setup
  2773. list and will be visible through the EnumerateDirectories call and also
  2774. also a creationID to the directoryRecord will be returned.
  2775. If this parameter is set to 'false', the catalog will be added to temporary list
  2776. and will be available for making other catalog service calls. The catalogs
  2777. which are not in the preference catalog list will not be visible through the
  2778. EnumerateDirectories call.
  2779. */
  2780.  
  2781. struct DirFindADAPDirectoryByNetSearchPB {
  2782.     void *                            qLink;
  2783.     long                             reserved1;
  2784.     long                             reserved2;
  2785.     DirIOCompletionUPP                 ioCompletion;
  2786.     OSErr                             ioResult;
  2787.     unsigned long                     saveA5;
  2788.     short                             reqCode;
  2789.     long                             reserved[2];
  2790.     AddrBlock                         serverHint;
  2791.     short                             dsRefNum;
  2792.     unsigned long                     callID;
  2793.     AuthIdentity                     identity;
  2794.     long                             gReserved1;
  2795.     long                             gReserved2;
  2796.     long                             gReserved3;
  2797.     long                             clientData;
  2798.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  2799.     DirDiscriminator                 discriminator;                /*  --> discriminate between dup catalog names */
  2800.     Boolean                         addToOCESetup;                /*  --> add this catalog to OCE Setup List */
  2801.     Byte                             padByte;
  2802.     CreationID                         directoryRecordCID;            /* <--  creationID for the catalog record */
  2803. };
  2804. typedef struct DirFindADAPDirectoryByNetSearchPB DirFindADAPDirectoryByNetSearchPB;
  2805.  
  2806. /*
  2807. DirAddADAPDirectory:
  2808. The catalog specified by 'directoryName' and 'discriminator' will be
  2809. added to the list of catalogs maintained by the Toolbox. Once added,
  2810. the catalog is available across boots, until the catalog is removed
  2811. explicitly through a DirRemoveADAPDirectory call.
  2812. If 'serverHint' is not nil, the address provided will be used
  2813. to contact a PathFinder for the catalog specified.
  2814. If 'serverHint' is nil or does not point to a valid PathFinder server
  2815. for that catalog, this call will fail.
  2816. If 'addToOCESetup' is true, the catalog will be automatically added to the setup
  2817. catalog list and will be visible through EnumerateDirectories calls and
  2818. also a creationID to the directoryRecord will be returned.
  2819. If this parameter is set to 'false', catalog will be added to temprary list
  2820. and will be available for making other catalog service calls. The catalogs
  2821. which are not in the setup  list will not be visible through
  2822. EnumerateDirectories call.
  2823. */
  2824.  
  2825. struct DirAddADAPDirectoryPB {
  2826.     void *                            qLink;
  2827.     long                             reserved1;
  2828.     long                             reserved2;
  2829.     DirIOCompletionUPP                 ioCompletion;
  2830.     OSErr                             ioResult;
  2831.     unsigned long                     saveA5;
  2832.     short                             reqCode;
  2833.     long                             reserved[2];
  2834.     AddrBlock                         serverHint;
  2835.     short                             dsRefNum;
  2836.     unsigned long                     callID;
  2837.     AuthIdentity                     identity;
  2838.     long                             gReserved1;
  2839.     long                             gReserved2;
  2840.     long                             gReserved3;
  2841.     long                             clientData;
  2842.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  2843.     DirDiscriminator                 discriminator;                /*  --> discriminate between dup catalog names */
  2844.     Boolean                         addToOCESetup;                /*  --> add this catalog to OCE Setup */
  2845.     Byte                             padByte;
  2846.     CreationID                         directoryRecordCID;            /* <--  creationID for the catalog record */
  2847. };
  2848. typedef struct DirAddADAPDirectoryPB    DirAddADAPDirectoryPB;
  2849.  
  2850.  
  2851. /*
  2852. GetDirectoryInfo:
  2853. DirGetDirectoryInfo will do:
  2854.  
  2855. If a 'dsRefNum' is non-Zero, the catalog information for
  2856.     the corresponding  PAB will be  returned.
  2857.  If 'dsRefNum' is zero and 'serverHint' is non-zero, If the
  2858.  'serverHint' points to a valid ADAP Catalog Server(Path Finder),
  2859.  the catalog information (i.e. directoryName, discriminator, features)
  2860.  for that catalog will be returned.
  2861.     If a  valid catalog name and discriminator are provided
  2862.     features (Set of capability flags) for that catalog will be returned.
  2863. */
  2864.  
  2865. struct DirGetDirectoryInfoPB {
  2866.     void *                            qLink;
  2867.     long                             reserved1;
  2868.     long                             reserved2;
  2869.     DirIOCompletionUPP                 ioCompletion;
  2870.     OSErr                             ioResult;
  2871.     unsigned long                     saveA5;
  2872.     short                             reqCode;
  2873.     long                             reserved[2];
  2874.     AddrBlock                         serverHint;
  2875.     short                             dsRefNum;
  2876.     unsigned long                     callID;
  2877.     AuthIdentity                     identity;
  2878.     long                             gReserved1;
  2879.     long                             gReserved2;
  2880.     long                             gReserved3;
  2881.     long                             clientData;
  2882.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  2883.     DirDiscriminator                 discriminator;                /* <--> descriminate between dup catalog names */
  2884.     DirGestalt                         features;                    /* <--  capability bit flags */
  2885. };
  2886. typedef struct DirGetDirectoryInfoPB    DirGetDirectoryInfoPB;
  2887.  
  2888. /*
  2889.  * Note on Access Controls:
  2890.  * Access control is based on a list model.
  2891.  * You can get access controls list which gives dsObject and accMask for each dsObject.
  2892.  * GetAccessControl can be limited to currently supplied identity by setting forCurrentUserOnly.
  2893.  * There are special DSObjects are defined in ADASTypes.h for each of the category
  2894.  * supported in ADAS Catalogs. (kOwner, kFriends, kAuthenticatedToCluster, 
  2895.  * kAuthenticatedToDirectory, kGuest) and DUGetActlDSSpec call can be used
  2896.  * to obtain appropraiate DSSpec before making set calls to ADAS catalogs.
  2897.  *
  2898.  */
  2899.  
  2900.  
  2901.  
  2902.  
  2903.  
  2904. /*
  2905.     GetDNodeAccessControlGet:
  2906.     This call can be done to get back access control list for a DNode.
  2907.     pRLI -> RLI of the DNode whose access control list is sought
  2908.     curUserAccMask -> If this is 'true', Access controls for the user specified by
  2909.                       the identity parameter will be returned other wise entire list
  2910.                       will be returned.
  2911.     startingDsObj  -> If this is not nil, list should be started after this object.
  2912.     startingPointInclusive -> If staringDsObj is specified, include that in the returned
  2913.                               results.
  2914.                               
  2915.     The results will be collected in the 'getBuffer' supplied by the user.
  2916.     If buffer can not hold all the data returned 'daMoreData' error will be returned.
  2917.      
  2918.     If user receives 'noErr' or 'daMoreData', buffer will contain valid results. A user
  2919.     can extract the results in the 'getBuffer' by making 'DsGetDNodeAccessControlParse' call.
  2920.     
  2921.     Results returned for each DSObject will contain DSSpecPtr and three sets of access mask. 
  2922.  
  2923. */
  2924.  
  2925.  
  2926. struct DirGetDNodeAccessControlGetPB {
  2927.     void *                            qLink;
  2928.     long                             reserved1;
  2929.     long                             reserved2;
  2930.     DirIOCompletionUPP                 ioCompletion;
  2931.     OSErr                             ioResult;
  2932.     unsigned long                     saveA5;
  2933.     short                             reqCode;
  2934.     long                             reserved[2];
  2935.     AddrBlock                         serverHint;
  2936.     short                             dsRefNum;
  2937.     unsigned long                     callID;
  2938.     AuthIdentity                     identity;
  2939.     long                             gReserved1;
  2940.     long                             gReserved2;
  2941.     long                             gReserved3;
  2942.     long                             clientData;
  2943.     PackedRLIPtr                     pRLI;                        /*  -> RLI of the cluster whose access control list is sought  */
  2944.     long                             bReserved;                    /*  -- unused */
  2945.     long                             cReserved;                    /*  -- unused */
  2946.     long                             dReserved;                    /*  -- unused */
  2947.     long                             eResreved;                    /* --> */
  2948.     Boolean                         forCurrentUserOnly;            /* -->  */
  2949.     Boolean                         filler1;
  2950.     DSSpec *                        startingPoint;                /* --> starting Point */
  2951.     Boolean                         includeStartingPoint;        /* --> if true return the DsObject specified in starting point */
  2952.     Boolean                         filler2;
  2953.     void *                            getBuffer;                    /*    -> */
  2954.     unsigned long                     getBufferSize;                /*  -> */
  2955.  
  2956.  
  2957. };
  2958. typedef struct DirGetDNodeAccessControlGetPB DirGetDNodeAccessControlGetPB;
  2959. /* The Access Control call-back function is defined as follows: */
  2960. typedef CALLBACK_API( Boolean , ForEachDNodeAccessControlProcPtr )(long clientData, const DSSpec *dsObj, AccessMask activeDnodeAccMask, AccessMask defaultRecordAccMask, AccessMask defaultAttributeAccMask);
  2961. typedef STACK_UPP_TYPE(ForEachDNodeAccessControlProcPtr)         ForEachDNodeAccessControlUPP;
  2962.  
  2963. typedef ForEachDNodeAccessControlUPP     ForEachDNodeAccessControl;
  2964. /*
  2965.     GetDNodeAccessControlParse:
  2966.     After an GetDNodeAccessControlGet call has completed, 
  2967.     call GetDNodeAccessControlParse to parse through the buffer that
  2968.     that was filled in GetDNodeAccessControlGet.
  2969.     
  2970.     'eachObject' will be called each time to return to the client a
  2971.     DsObject and a set of three accMasks (three long words) for that object.
  2972.     Acceesmasks returned apply to the dsObject in the callback :
  2973.     1. Currently Active Access mask for the specified DNode.
  2974.     2. Default Access mask for any Record in the DNode
  2975.     3. Default Access mask for any Attribute in the DNode
  2976.     The clientData parameter that you pass in the parameter block will be passed
  2977.     to 'eachObject'.  You are free to put anything in clientData - it is intended
  2978.     to allow you some way to match the call-back to the original call (for
  2979.     example, you make more then one aysynchronous GetDNodeAccessControlGet calls and you want to
  2980.     associate returned results in some way).
  2981.     
  2982.     The client should return FALSE from 'eachObject' to continue
  2983.     processing of the GetDNodeAccessControlParse request.  Returning TRUE will
  2984.     terminate the GetDNodeAccessControlParse request.
  2985.  
  2986.     For synchronous calls, the call-back routine actually runs as part of the same thread 
  2987.     of execution as the thread that made the GetDNodeAccessControlParse call.  That means that the
  2988.     same low-memory globals, A5, stack, etc. are in effect during the call-back
  2989.     that were in effect when the call was made.  Because of this, the call-back
  2990.     routine has the same restrictions as the caller of GetDNodeAccessControlParse:
  2991.     if GetDNodeAccessControlParse was not called from interrupt level, then the call-
  2992.     back routine can allocate memory. For asynchronous calls, call-back routine is
  2993.     like a ioCompletion except that A5 will be preserved for the application.
  2994.  
  2995.  
  2996. */
  2997.  
  2998.  
  2999. struct DirGetDNodeAccessControlParsePB {
  3000.     void *                            qLink;
  3001.     long                             reserved1;
  3002.     long                             reserved2;
  3003.     DirIOCompletionUPP                 ioCompletion;
  3004.     OSErr                             ioResult;
  3005.     unsigned long                     saveA5;
  3006.     short                             reqCode;
  3007.     long                             reserved[2];
  3008.     AddrBlock                         serverHint;
  3009.     short                             dsRefNum;
  3010.     unsigned long                     callID;
  3011.     AuthIdentity                     identity;
  3012.     long                             gReserved1;
  3013.     long                             gReserved2;
  3014.     long                             gReserved3;
  3015.     long                             clientData;
  3016.     PackedRLIPtr                     pRLI;                        /*  -> RLI of the cluster  */
  3017.     long                             bReserved;                    /*  -- unused */
  3018.     long                             cReserved;                    /*  -- unused */
  3019.     long                             dReserved;                    /*  -- unused */
  3020.     ForEachDNodeAccessControl         eachObject;                    /* --> */
  3021.     Boolean                         forCurrentUserOnly;            /* -->  */
  3022.     Boolean                         filler1;
  3023.     DSSpec *                        startingPoint;                /* --> starting Point */
  3024.     Boolean                         includeStartingPoint;        /* --> if true return the record specified in starting point */
  3025.     Boolean                         filler2;
  3026.     void *                            getBuffer;                    /*    -> */
  3027.     unsigned long                     getBufferSize;                /*  -> */
  3028.  
  3029.  
  3030. };
  3031. typedef struct DirGetDNodeAccessControlParsePB DirGetDNodeAccessControlParsePB;
  3032. /*
  3033.     GetRecordAccessControlGet:
  3034.     This call can be done to get back access control list for a RecordID.
  3035.     aRecord -> RecordID to which access control list is sought
  3036.     curUserAccMask -> If this is 'true', Access controls for the user specified by
  3037.                       the identity parameter will be returned other wise entire list
  3038.                       will be returned.
  3039.     startingDsObj  -> If this is not nil, list should be started after this object.
  3040.     startingPointInclusive -> If staringDsObj is specified, include that in the returned
  3041.                               results.
  3042.                               
  3043.     The results will be collected in the 'getBuffer' supplied by the user.
  3044.     If buffer can not hold all the data returned 'daMoreData' error will be returned.
  3045.      
  3046.     If user receives 'noErr' or 'daMoreData', buffer will contain valid results. A user
  3047.     can extract the results in the 'getBuffer' by making 'DsGetDNodeAccessControlParse' call.
  3048.     
  3049.     Results returned for each DSObject will contain DSSpecPtr and accMask. 
  3050.  
  3051. */
  3052.  
  3053.  
  3054. struct DirGetRecordAccessControlGetPB {
  3055.     void *                            qLink;
  3056.     long                             reserved1;
  3057.     long                             reserved2;
  3058.     DirIOCompletionUPP                 ioCompletion;
  3059.     OSErr                             ioResult;
  3060.     unsigned long                     saveA5;
  3061.     short                             reqCode;
  3062.     long                             reserved[2];
  3063.     AddrBlock                         serverHint;
  3064.     short                             dsRefNum;
  3065.     unsigned long                     callID;
  3066.     AuthIdentity                     identity;
  3067.     long                             gReserved1;
  3068.     long                             gReserved2;
  3069.     long                             gReserved3;
  3070.     long                             clientData;
  3071.     RecordIDPtr                     aRecord;                    /*  -> RecordID to which access control list is sought list is sought  */
  3072.     long                             bReserved;                    /*  -- unused */
  3073.     long                             cReserved;                    /*  -- unused */
  3074.     long                             dReserved;                    /*  -- unused */
  3075.     long                             eResreved;                    /* --> */
  3076.     Boolean                         forCurrentUserOnly;            /* -->  */
  3077.     Boolean                         filler1;
  3078.     DSSpec *                        startingPoint;                /* --> starting Point */
  3079.     Boolean                         includeStartingPoint;        /* --> if true return the record specified in starting point */
  3080.     Boolean                         filler2;
  3081.     void *                            getBuffer;                    /*    -> */
  3082.     unsigned long                     getBufferSize;                /*  -> */
  3083.  
  3084.  
  3085. };
  3086. typedef struct DirGetRecordAccessControlGetPB DirGetRecordAccessControlGetPB;
  3087. /* The Access Control call-back function is defined as follows: */
  3088. typedef CALLBACK_API( Boolean , ForEachRecordAccessControlProcPtr )(long clientData, const DSSpec *dsObj, AccessMask activeDnodeAccMask, AccessMask activeRecordAccMask, AccessMask defaultAttributeAccMask);
  3089. typedef STACK_UPP_TYPE(ForEachRecordAccessControlProcPtr)         ForEachRecordAccessControlUPP;
  3090.  
  3091. typedef ForEachRecordAccessControlUPP     ForEachRecordAccessControl;
  3092. /*
  3093.     GetRecordAccessControlParse:
  3094.     After an GetRecordAccessControlGet call has completed, 
  3095.     call GetRecordAccessControlParse to parse through the buffer that
  3096.     that was filled in GetRecordAccessControlGet.
  3097.     
  3098.     'eachObject' will be called each time to return to the client a
  3099.     DsObject and a set of three accMasks (three long words) for that object.
  3100.     Acceesmasks returned apply to the dsObject in the callback :
  3101.     1. Active Access mask for the DNode Containing the Record.
  3102.     2. Active Access mask for the Record specified.
  3103.     3. Defualt Access mask for Attributes in the record.
  3104.     The clientData parameter that you pass in the parameter block will be passed
  3105.     to 'eachObject'.  You are free to put anything in clientData - it is intended
  3106.     to allow you some way to match the call-back to the original call (for
  3107.     example, you make more then one aysynchronous GetRecordAccessControlGet calls and you want to
  3108.     associate returned results in some way).
  3109.     
  3110.     The client should return FALSE from 'eachObject' to continue
  3111.     processing of the GetRecordAccessControlParse request.  Returning TRUE will
  3112.     terminate the GetRecordAccessControlParse request.
  3113.  
  3114.     For synchronous calls, the call-back routine actually runs as part of the same thread 
  3115.     of execution as the thread that made the GetRecordAccessControlParse call.  That means that the
  3116.     same low-memory globals, A5, stack, etc. are in effect during the call-back
  3117.     that were in effect when the call was made.  Because of this, the call-back
  3118.     routine has the same restrictions as the caller of GetRecordAccessControlParse:
  3119.     if GetRecordAccessControlParse was not called from interrupt level, then the call-
  3120.     back routine can allocate memory. For asynchronous calls, call-back routine is
  3121.     like a ioCompletion except that A5 will be preserved for the application.
  3122.  
  3123.  
  3124. */
  3125.  
  3126.  
  3127. struct DirGetRecordAccessControlParsePB {
  3128.     void *                            qLink;
  3129.     long                             reserved1;
  3130.     long                             reserved2;
  3131.     DirIOCompletionUPP                 ioCompletion;
  3132.     OSErr                             ioResult;
  3133.     unsigned long                     saveA5;
  3134.     short                             reqCode;
  3135.     long                             reserved[2];
  3136.     AddrBlock                         serverHint;
  3137.     short                             dsRefNum;
  3138.     unsigned long                     callID;
  3139.     AuthIdentity                     identity;
  3140.     long                             gReserved1;
  3141.     long                             gReserved2;
  3142.     long                             gReserved3;
  3143.     long                             clientData;
  3144.     RecordIDPtr                     aRecord;                    /*  -> RecordID to which access control list is sought list is sought  */
  3145.     long                             bReserved;                    /*  -- unused */
  3146.     long                             cReserved;                    /*  -- unused */
  3147.     long                             dReserved;                    /*  -- unused */
  3148.     ForEachRecordAccessControl         eachObject;                    /* --> */
  3149.     Boolean                         forCurrentUserOnly;            /* -->  */
  3150.     Boolean                         filler1;
  3151.     DSSpec *                        startingPoint;                /* --> starting Point */
  3152.     Boolean                         includeStartingPoint;        /* --> if true return the record specified in starting point */
  3153.     Boolean                         filler2;
  3154.     void *                            getBuffer;                    /*    -> */
  3155.     unsigned long                     getBufferSize;                /*  -> */
  3156.  
  3157.  
  3158. };
  3159. typedef struct DirGetRecordAccessControlParsePB DirGetRecordAccessControlParsePB;
  3160. /*
  3161.     GetAttributeAccessControlGet:
  3162.     This call can be done to get back access control list for a attributeType with in a RecordID.
  3163.     aRecord -> RecordID to which access control list is sought
  3164.     aType    -> Attribute Type to which access controls are sought
  3165.     curUserAccMask -> If this is 'true', Access controls for the user specified by
  3166.                       the identity parameter will be returned other wise entire list
  3167.                       will be returned.
  3168.     startingDsObj  -> If this is not nil, list should be started after this object.
  3169.     startingPointInclusive -> If staringDsObj is specified, include that in the returned
  3170.                               results.
  3171.                               
  3172.     The results will be collected in the 'getBuffer' supplied by the user.
  3173.     If buffer can not hold all the data returned 'daMoreData' error will be returned.
  3174.      
  3175.     If user receives 'noErr' or 'daMoreData', buffer will contain valid results. A user
  3176.     can extract the results in the 'getBuffer' by making 'DsGetDNodeAccessControlParse' call.
  3177.     
  3178.     Results returned for each DSObject will contain DSSpecPtr and accMask. 
  3179.  
  3180. */
  3181.  
  3182.  
  3183. struct DirGetAttributeAccessControlGetPB {
  3184.     void *                            qLink;
  3185.     long                             reserved1;
  3186.     long                             reserved2;
  3187.     DirIOCompletionUPP                 ioCompletion;
  3188.     OSErr                             ioResult;
  3189.     unsigned long                     saveA5;
  3190.     short                             reqCode;
  3191.     long                             reserved[2];
  3192.     AddrBlock                         serverHint;
  3193.     short                             dsRefNum;
  3194.     unsigned long                     callID;
  3195.     AuthIdentity                     identity;
  3196.     long                             gReserved1;
  3197.     long                             gReserved2;
  3198.     long                             gReserved3;
  3199.     long                             clientData;
  3200.     RecordIDPtr                     aRecord;                    /*  -> RecordID to which access control list is sought list is sought  */
  3201.     AttributeTypePtr                 aType;                        /*  -> Attribute Type to which access controls are sought          */
  3202.     long                             cReserved;                    /*  -- unused */
  3203.     long                             dReserved;                    /*  -- unused */
  3204.     long                             eResreved;                    /* --> */
  3205.     Boolean                         forCurrentUserOnly;            /* -->  */
  3206.     Boolean                         filler1;
  3207.     DSSpec *                        startingPoint;                /* --> starting Point */
  3208.     Boolean                         includeStartingPoint;        /* --> if true return the record specified in starting point */
  3209.     Boolean                         filler2;
  3210.     void *                            getBuffer;                    /*    -> */
  3211.     unsigned long                     getBufferSize;                /*  -> */
  3212.  
  3213.  
  3214. };
  3215. typedef struct DirGetAttributeAccessControlGetPB DirGetAttributeAccessControlGetPB;
  3216. /* The Access Control call-back function is defined as follows: */
  3217. typedef CALLBACK_API( Boolean , ForEachAttributeAccessControlProcPtr )(long clientData, const DSSpec *dsObj, AccessMask activeDnodeAccMask, AccessMask activeRecordAccMask, AccessMask activeAttributeAccMask);
  3218. typedef STACK_UPP_TYPE(ForEachAttributeAccessControlProcPtr)     ForEachAttributeAccessControlUPP;
  3219.  
  3220. typedef ForEachAttributeAccessControlUPP  ForEachAttributeAccessControl;
  3221. /*
  3222.     GetAttributeAccessControlParse:
  3223.     After an GetAttributeAccessControlGet call has completed, 
  3224.     call GetAttributeAccessControlParse to parse through the buffer that
  3225.     that was filled in GetAttributeAccessControlGet.
  3226.     
  3227.     'eachObject' will be called each time to return to the client a
  3228.     DsObject and a set of three accMasks (three long words) for that object.
  3229.     Acceesmasks returned apply to the dsObject in the callback :
  3230.     1. Active Access mask for the DNode Containing the Attribute.
  3231.     2. Active Access mask for the Record in the Containing the Attribute.
  3232.     3. Active Access mask for the specified Attribute.
  3233.     The clientData parameter that you pass in the parameter block will be passed
  3234.     to 'eachObject'.  You are free to put anything in clientData - it is intended
  3235.     to allow you some way to match the call-back to the original call (for
  3236.     example, you make more then one aysynchronous GetAttributeAccessControlGet calls and you want to
  3237.     associate returned results in some way).
  3238.     
  3239.     The client should return FALSE from 'eachObject' to continue
  3240.     processing of the GetAttributeAccessControlParse request.  Returning TRUE will
  3241.     terminate the GetAttributeAccessControlParse request.
  3242.  
  3243.     For synchronous calls, the call-back routine actually runs as part of the same thread 
  3244.     of execution as the thread that made the GetAttributeAccessControlParse call.  That means that the
  3245.     same low-memory globals, A5, stack, etc. are in effect during the call-back
  3246.     that were in effect when the call was made.  Because of this, the call-back
  3247.     routine has the same restrictions as the caller of GetAttributeAccessControlParse:
  3248.     if GetAttributeAccessControlParse was not called from interrupt level, then the call-
  3249.     back routine can allocate memory. For asynchronous calls, call-back routine is
  3250.     like a ioCompletion except that A5 will be preserved for the application.
  3251.  
  3252.  
  3253. */
  3254.  
  3255.  
  3256. struct DirGetAttributeAccessControlParsePB {
  3257.     void *                            qLink;
  3258.     long                             reserved1;
  3259.     long                             reserved2;
  3260.     DirIOCompletionUPP                 ioCompletion;
  3261.     OSErr                             ioResult;
  3262.     unsigned long                     saveA5;
  3263.     short                             reqCode;
  3264.     long                             reserved[2];
  3265.     AddrBlock                         serverHint;
  3266.     short                             dsRefNum;
  3267.     unsigned long                     callID;
  3268.     AuthIdentity                     identity;
  3269.     long                             gReserved1;
  3270.     long                             gReserved2;
  3271.     long                             gReserved3;
  3272.     long                             clientData;
  3273.     RecordIDPtr                     aRecord;                    /*  -> RecordID to which access control list is sought list is sought  */
  3274.     AttributeTypePtr                 aType;                        /*  -> Attribute Type to which access controls are sought          */
  3275.     long                             cReserved;                    /*  -- unused */
  3276.     long                             dReserved;                    /*  -- unused */
  3277.     ForEachAttributeAccessControl     eachObject;                    /* --> */
  3278.     Boolean                         forCurrentUserOnly;            /* -->  */
  3279.     Boolean                         filler1;
  3280.     DSSpec *                        startingPoint;                /* --> starting Point */
  3281.     Boolean                         includeStartingPoint;        /* --> if true return the record specified in starting point */
  3282.     Boolean                         filler2;
  3283.     void *                            getBuffer;                    /*    -> */
  3284.     unsigned long                     getBufferSize;                /*  -> */
  3285.  
  3286.  
  3287. };
  3288. typedef struct DirGetAttributeAccessControlParsePB DirGetAttributeAccessControlParsePB;
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294. /*
  3295. MapPathNameToDNodeNumber:
  3296. This call maps a given PathName within a catalog to its DNodeNumber.
  3297. */
  3298.  
  3299. struct DirMapPathNameToDNodeNumberPB {
  3300.     void *                            qLink;
  3301.     long                             reserved1;
  3302.     long                             reserved2;
  3303.     DirIOCompletionUPP                 ioCompletion;
  3304.     OSErr                             ioResult;
  3305.     unsigned long                     saveA5;
  3306.     short                             reqCode;
  3307.     long                             reserved[2];
  3308.     AddrBlock                         serverHint;
  3309.     short                             dsRefNum;
  3310.     unsigned long                     callID;
  3311.     AuthIdentity                     identity;
  3312.     long                             gReserved1;
  3313.     long                             gReserved2;
  3314.     long                             gReserved3;
  3315.     long                             clientData;
  3316.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  3317.     DirDiscriminator                 discriminator;                /*  --> discriminator */
  3318.     DNodeNum                         dNodeNumber;                /* <--  dNodenumber to the path */
  3319.     PackedPathNamePtr                 path;                        /*  --> Path Name to be mapped */
  3320. };
  3321. typedef struct DirMapPathNameToDNodeNumberPB DirMapPathNameToDNodeNumberPB;
  3322. /*
  3323. PathName in the path field will be mapped to the cooresponding dNodeNumber and
  3324. returned in the DNodeNumber field. directoryName and descriminator Fields are
  3325. ignored. DSRefNum is used to identify the catalog.
  3326. */
  3327.  
  3328.  
  3329. /*
  3330. MapDNodeNumberToPathName:
  3331. This call will map a given DNodeNumber with in a catalog to the
  3332. corresponding PathName.
  3333. */
  3334.  
  3335. struct DirMapDNodeNumberToPathNamePB {
  3336.     void *                            qLink;
  3337.     long                             reserved1;
  3338.     long                             reserved2;
  3339.     DirIOCompletionUPP                 ioCompletion;
  3340.     OSErr                             ioResult;
  3341.     unsigned long                     saveA5;
  3342.     short                             reqCode;
  3343.     long                             reserved[2];
  3344.     AddrBlock                         serverHint;
  3345.     short                             dsRefNum;
  3346.     unsigned long                     callID;
  3347.     AuthIdentity                     identity;
  3348.     long                             gReserved1;
  3349.     long                             gReserved2;
  3350.     long                             gReserved3;
  3351.     long                             clientData;
  3352.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  3353.     DirDiscriminator                 discriminator;                /*  --> discriminator */
  3354.     DNodeNum                         dNodeNumber;                /*  --> dNodenumber to be mapped */
  3355.     PackedPathNamePtr                 path;                        /* <--  Packed Path Name returned */
  3356.     unsigned short                     lengthOfPathName;            /*  --> length of packed pathName structure*/
  3357. };
  3358. typedef struct DirMapDNodeNumberToPathNamePB DirMapDNodeNumberToPathNamePB;
  3359. /*
  3360. dNodeNumber in the DNodeNumber field will be mapped to the cooresponding
  3361. pathName and returned in the PackedPathName field.
  3362. lengthOfPathName is to be set the length of pathName structure.
  3363. If length of PackedPathName is larger then the lengthOfPathName, kOCEMoreData
  3364. OSErr will be returned.
  3365. */
  3366. /*
  3367. GetLocalNetworkSpec:
  3368. This call will return the Local NetworkSpec. Client should supply
  3369. an RString big enough to hold the NetworkSpec.
  3370. */
  3371.  
  3372. struct DirGetLocalNetworkSpecPB {
  3373.     void *                            qLink;
  3374.     long                             reserved1;
  3375.     long                             reserved2;
  3376.     DirIOCompletionUPP                 ioCompletion;
  3377.     OSErr                             ioResult;
  3378.     unsigned long                     saveA5;
  3379.     short                             reqCode;
  3380.     long                             reserved[2];
  3381.     AddrBlock                         serverHint;
  3382.     short                             dsRefNum;
  3383.     unsigned long                     callID;
  3384.     AuthIdentity                     identity;
  3385.     long                             gReserved1;
  3386.     long                             gReserved2;
  3387.     long                             gReserved3;
  3388.     long                             clientData;
  3389.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  3390.     DirDiscriminator                 discriminator;                /*  --> discriminator */
  3391.     NetworkSpecPtr                     networkSpec;                /* <--  NetworkSpec */
  3392. };
  3393. typedef struct DirGetLocalNetworkSpecPB    DirGetLocalNetworkSpecPB;
  3394. /*
  3395. PathName in the path field must be set to nil. internetName should be large
  3396. enough to hold the internetName. InterNetname returned indicates path finder's
  3397. local internet (configured by administrator).
  3398. */
  3399. /*
  3400. GetDNodeInfo:
  3401. This call will return the information (internetName and descriptor)
  3402. for the given RLI of a DNode.
  3403. */
  3404.  
  3405. struct DirGetDNodeInfoPB {
  3406.     void *                            qLink;
  3407.     long                             reserved1;
  3408.     long                             reserved2;
  3409.     DirIOCompletionUPP                 ioCompletion;
  3410.     OSErr                             ioResult;
  3411.     unsigned long                     saveA5;
  3412.     short                             reqCode;
  3413.     long                             reserved[2];
  3414.     AddrBlock                         serverHint;
  3415.     short                             dsRefNum;
  3416.     unsigned long                     callID;
  3417.     AuthIdentity                     identity;
  3418.     long                             gReserved1;
  3419.     long                             gReserved2;
  3420.     long                             gReserved3;
  3421.     long                             clientData;
  3422.     PackedRLIPtr                     pRLI;                        /*  --> packed RLI whose info is requested */
  3423.     DirNodeKind                     descriptor;                    /* <--  dNode descriptor */
  3424.     NetworkSpecPtr                     networkSpec;                /* <--  cluster's networkSpec if kIsCluster */
  3425. };
  3426. typedef struct DirGetDNodeInfoPB        DirGetDNodeInfoPB;
  3427. /*
  3428. If DnodeNumber is set to a non zero value, path should be set to nil.
  3429. if DnodeNumber is set to zero, pathName should point to a packed path name.
  3430. internetName should be large enough to hold
  3431. the internetName. (If the internetName is same as the one got by
  3432. GetLocalInternetName call, it indicates cluster is reachable  without
  3433. forwarders, --> Tell me if I am wrong)
  3434. */
  3435.  
  3436. /*
  3437. DirCreatePersonalDirectory:
  3438. A new  personal catalog can be created by specifying an FSSpec for
  3439. the file. If a file already exists dupFNErr will be returned. This call is
  3440. supported 'synchronous' mode only.
  3441. */
  3442.  
  3443. struct DirCreatePersonalDirectoryPB {
  3444.     void *                            qLink;
  3445.     long                             reserved1;
  3446.     long                             reserved2;
  3447.     DirIOCompletionUPP                 ioCompletion;
  3448.     OSErr                             ioResult;
  3449.     unsigned long                     saveA5;
  3450.     short                             reqCode;
  3451.     long                             reserved[2];
  3452.     AddrBlock                         serverHint;
  3453.     short                             dsRefNum;
  3454.     unsigned long                     callID;
  3455.     AuthIdentity                     identity;
  3456.     long                             gReserved1;
  3457.     long                             gReserved2;
  3458.     long                             gReserved3;
  3459.     long                             clientData;
  3460.     FSSpecPtr                         fsSpec;                        /*  --> FSSpec for the Personal Catalog */
  3461.     OSType                             fdType;                        /*  --> file type for the Personal Catalog */
  3462.     OSType                             fdCreator;                    /*  --> file creator for the Personal Catalog */
  3463. };
  3464. typedef struct DirCreatePersonalDirectoryPB DirCreatePersonalDirectoryPB;
  3465. /*
  3466. DirOpenPersonalDirectory:
  3467. An existing personal catalog can be opened using this call.
  3468. User can specify the personal catalog by FSSpec for the AddressBook file.
  3469. 'accessRequested' field specifies open permissions. 'fsRdPerm'  & 'fsRdWrPerm'
  3470. are the only accepted open modes for the address book.
  3471. When the call completes successfully, a dsRefNum will be returned. The 'dsRefNum'
  3472. field is in the DSParamBlockHeader. In addittion 'accessGranted' indicates
  3473. actual permission with personal catalog is opened and 'features' indicate the capabilty flags
  3474. associated with the personal catalog.
  3475. This call is supported 'synchronous' mode only.
  3476. */
  3477.  
  3478.  
  3479. struct DirOpenPersonalDirectoryPB {
  3480.     void *                            qLink;
  3481.     long                             reserved1;
  3482.     long                             reserved2;
  3483.     DirIOCompletionUPP                 ioCompletion;
  3484.     OSErr                             ioResult;
  3485.     unsigned long                     saveA5;
  3486.     short                             reqCode;
  3487.     long                             reserved[2];
  3488.     AddrBlock                         serverHint;
  3489.     short                             dsRefNum;
  3490.     unsigned long                     callID;
  3491.     AuthIdentity                     identity;
  3492.     long                             gReserved1;
  3493.     long                             gReserved2;
  3494.     long                             gReserved3;
  3495.     long                             clientData;
  3496.     FSSpecPtr                         fsSpec;                        /*  --> Open an existing Personal Catalog */
  3497.     SInt8                             accessRequested;            /*  --> Open: permissions Requested(byte)*/
  3498.     SInt8                             accessGranted;                /*  <-- Open: permissions (byte) (Granted)*/
  3499.     DirGestalt                         features;                    /* <--  features for Personal Catalog */
  3500. };
  3501. typedef struct DirOpenPersonalDirectoryPB DirOpenPersonalDirectoryPB;
  3502. /*
  3503. DirClosePersonalDirectory: This call lets a client close AddressBook opened by DirOpenPersonalDirectory.
  3504. The Personal Catalog specified by the 'dsRefNum' will be closed.
  3505. This call is supported 'synchronous' mode only.
  3506. */
  3507.  
  3508. struct DirClosePersonalDirectoryPB {
  3509.     void *                            qLink;
  3510.     long                             reserved1;
  3511.     long                             reserved2;
  3512.     DirIOCompletionUPP                 ioCompletion;
  3513.     OSErr                             ioResult;
  3514.     unsigned long                     saveA5;
  3515.     short                             reqCode;
  3516.     long                             reserved[2];
  3517.     AddrBlock                         serverHint;
  3518.     short                             dsRefNum;
  3519.     unsigned long                     callID;
  3520.     AuthIdentity                     identity;
  3521.     long                             gReserved1;
  3522.     long                             gReserved2;
  3523.     long                             gReserved3;
  3524.     long                             clientData;
  3525. };
  3526. typedef struct DirClosePersonalDirectoryPB DirClosePersonalDirectoryPB;
  3527.  
  3528. /*
  3529. DirMakePersonalDirectoryRLI: With this call a client can make an RLI
  3530. for a Personal Catalog opened by DirOpenPersonalDirectory Call.
  3531. A packed RLI is created for the Personal Catalog specified by the 'dsRefNum'.
  3532. If a client has a need to make the AddressBook reference to persistent
  3533. acrross boots it should make use of this call. In the current implementaion
  3534. PackedRLI has an embeeded System7.0 'alias'. If in later time
  3535. If client has a need to make reference to the AddressBook, it must use
  3536. ADAPLibrary call 'DUExtractAlias' and resole the 'alias' to 'FSSpec' and
  3537. make DirOpenPersonalDirectory call to get a 'dsRefNum'.
  3538.   'fromFSSpec'            FSPecPtr from which relative alias to be created. If nil,
  3539.                         absolute alias is created.
  3540.  'pRLIBufferSize' indicates the size of buffer pointed by 'pRLI'
  3541.  'pRLISize'    indicates the actual length of 'pRLI'. If the call
  3542.                         fails with 'kOCEMoreData' error a client can reissue
  3543.                     this call with a larger buffer of this length.
  3544.   'pRLI' is pointer to the buffer in which 'PackedRLI' is
  3545.   returned.
  3546. This call is supported in 'synchronous' mode only.
  3547. */
  3548.  
  3549. struct DirMakePersonalDirectoryRLIPB {
  3550.     void *                            qLink;
  3551.     long                             reserved1;
  3552.     long                             reserved2;
  3553.     DirIOCompletionUPP                 ioCompletion;
  3554.     OSErr                             ioResult;
  3555.     unsigned long                     saveA5;
  3556.     short                             reqCode;
  3557.     long                             reserved[2];
  3558.     AddrBlock                         serverHint;
  3559.     short                             dsRefNum;
  3560.     unsigned long                     callID;
  3561.     AuthIdentity                     identity;
  3562.     long                             gReserved1;
  3563.     long                             gReserved2;
  3564.     long                             gReserved3;
  3565.     long                             clientData;
  3566.     FSSpecPtr                         fromFSSpec;                    /*  --> FSSpec for creating relative alia */
  3567.     unsigned short                     pRLIBufferSize;                /*  --> Length of 'pRLI' buffer */
  3568.     unsigned short                     pRLISize;                    /* <--  Length of actual 'pRLI' */
  3569.     PackedRLIPtr                     pRLI;                        /* <--  pRLI for the specified AddressBook */
  3570. };
  3571. typedef struct DirMakePersonalDirectoryRLIPB DirMakePersonalDirectoryRLIPB;
  3572.  
  3573. /*****************************************************************************
  3574. The calls described below apply only for CSAM Drivers:
  3575.  
  3576. The following three calls provide capability to Install/Remove a CSAM at RunTime.
  3577.     DirAddDSAM
  3578.     DirRemoveDSAM
  3579.     DirInstantiateDSAM
  3580.  
  3581. The following two calls provide capability to Install/Remove a CSAM Catalog at RunTime.
  3582.     DirAddDSAMDirectory
  3583.     DirRemoveDirectory
  3584.  
  3585. DirGetDirectoryIcon call is used by clients to get any special icon associated
  3586. with a CSAM catalog.
  3587.  
  3588. *****************************************************************************/
  3589.  
  3590. /*
  3591. DirAddDSAM: This call can be used to inorm the availability of a CSAM file
  3592. after discovering the CSAM file.
  3593.     dsamName -> is generic CSAM name e.g. Untitled X.500 directory
  3594.     dsamSignature -> could be generic CSAM kind e.g. 'X500'.
  3595.     fsSpec -> is the FileSpec for the file containing CSAM resources.
  3596. If the call is successfull 'DSAMRecordCID' will be returned. If the
  3597. call returns 'daDSAMRecordCIDExists', record was already there and
  3598. 'dsamRecordCID' will be returned.
  3599. This call can be done only in synchronous mode.
  3600. */
  3601.  
  3602. struct DirAddDSAMPB {
  3603.     void *                            qLink;
  3604.     long                             reserved1;
  3605.     long                             reserved2;
  3606.     DirIOCompletionUPP                 ioCompletion;
  3607.     OSErr                             ioResult;
  3608.     unsigned long                     saveA5;
  3609.     short                             reqCode;
  3610.     long                             reserved[2];
  3611.     AddrBlock                         serverHint;
  3612.     short                             dsRefNum;
  3613.     unsigned long                     callID;
  3614.     AuthIdentity                     identity;
  3615.     long                             gReserved1;
  3616.     long                             gReserved2;
  3617.     long                             gReserved3;
  3618.     long                             clientData;
  3619.     CreationID                         dsamRecordCID;                /* <--  CreationID for the CSAM record */
  3620.     RStringPtr                         dsamName;                    /*  --> CSAM name */
  3621.     OCEDirectoryKind                 dsamKind;                    /*  --> CSAM kind */
  3622.     FSSpecPtr                         fsSpec;                        /*  --> FSSpec for the file containing CSAM */
  3623. };
  3624. typedef struct DirAddDSAMPB                DirAddDSAMPB;
  3625. /*
  3626. DirInstantiateDSAM: This call should be used by the CSAM driver in response
  3627. Driver Open call to indicate the toolbox about the availability of the CSAM.
  3628.     dsamName -> is generic CSAM name e.g. Untitled X.500 directory
  3629.     dsamKind -> could be generic CSAM kind e.g. 'X500'.
  3630.     dsamData -> pointer to private DSAMData. This will be paased back to the CSAM
  3631.     when the CSAM functions (DSAMDirProc,DSAMDirParseProc, DSAMAuthProc) are called.
  3632.     CSAM should already be setup using DirAddDSAM call.
  3633.     DSAMDirProc -> This procedure will be called when  any catalog service
  3634.     call intended for the CSAM (other then parse calls)
  3635.     DSAMDirParseProc -> This procedure will be called when any of the parse calls
  3636.     are called.
  3637.     DSAMAuthProc -> This procedure will be called when any of the Authentication Calls
  3638.     are made to the CSAM. If the CSAM does not support authentication, this can be nil.
  3639. This call can be done only in synchronous mode.
  3640. */
  3641. typedef CALLBACK_API( OSErr , DSAMDirProcPtr )(void *dsamData, DirParamBlockPtr paramBlock, Boolean async);
  3642. typedef STACK_UPP_TYPE(DSAMDirProcPtr)                             DSAMDirUPP;
  3643.  
  3644. typedef DSAMDirUPP                         DSAMDirProc;
  3645. typedef CALLBACK_API( OSErr , DSAMDirParseProcPtr )(void *dsamData, DirParamBlockPtr paramBlock, Boolean async);
  3646. typedef STACK_UPP_TYPE(DSAMDirParseProcPtr)                     DSAMDirParseUPP;
  3647. typedef DSAMDirParseUPP                 DSAMDirParseProc;
  3648. typedef CALLBACK_API( OSErr , DSAMAuthProcPtr )(void *dsamData, AuthParamBlockPtr pb, Boolean async);
  3649. typedef STACK_UPP_TYPE(DSAMAuthProcPtr)                         DSAMAuthUPP;
  3650. typedef DSAMAuthUPP                     DSAMAuthProc;
  3651.  
  3652. struct DirInstantiateDSAMPB {
  3653.     void *                            qLink;
  3654.     long                             reserved1;
  3655.     long                             reserved2;
  3656.     DirIOCompletionUPP                 ioCompletion;
  3657.     OSErr                             ioResult;
  3658.     unsigned long                     saveA5;
  3659.     short                             reqCode;
  3660.     long                             reserved[2];
  3661.     AddrBlock                         serverHint;
  3662.     short                             dsRefNum;
  3663.     unsigned long                     callID;
  3664.     AuthIdentity                     identity;
  3665.     long                             gReserved1;
  3666.     long                             gReserved2;
  3667.     long                             gReserved3;
  3668.     long                             clientData;
  3669.     RStringPtr                         dsamName;                    /*  --> dsamName name */
  3670.     OCEDirectoryKind                 dsamKind;                    /*  --> DSAMKind */
  3671.     void *                            dsamData;                    /*  --> dsamData  */
  3672.     DSAMDirUPP                         dsamDirProc;                /*  --> of type DSAMDirProc: for catalog service calls */
  3673.     DSAMDirParseUPP                 dsamDirParseProc;            /*  --> of type DSAMDirParseProc: for catalog service parse calls */
  3674.     DSAMAuthUPP                     dsamAuthProc;                /*  --> of type DSAMAuthProc: for authetication service calls */
  3675. };
  3676. typedef struct DirInstantiateDSAMPB        DirInstantiateDSAMPB;
  3677.  
  3678. /*
  3679. DirRemoveDSAM: This call can be used to remove  a CSAM file from the OCE Setup.
  3680.     dsamRecordCID -> is the creationID of the CSAM record.
  3681. This call can be made only in synchronous mode.
  3682. */
  3683.  
  3684. struct DirRemoveDSAMPB {
  3685.     void *                            qLink;
  3686.     long                             reserved1;
  3687.     long                             reserved2;
  3688.     DirIOCompletionUPP                 ioCompletion;
  3689.     OSErr                             ioResult;
  3690.     unsigned long                     saveA5;
  3691.     short                             reqCode;
  3692.     long                             reserved[2];
  3693.     AddrBlock                         serverHint;
  3694.     short                             dsRefNum;
  3695.     unsigned long                     callID;
  3696.     AuthIdentity                     identity;
  3697.     long                             gReserved1;
  3698.     long                             gReserved2;
  3699.     long                             gReserved3;
  3700.     long                             clientData;
  3701.     CreationID                         dsamRecordCID;                /* <--  CreationID for the CSAM record */
  3702. };
  3703. typedef struct DirRemoveDSAMPB            DirRemoveDSAMPB;
  3704.  
  3705. /*
  3706. DirAddDSAMDirectory: This call can be used to inorm the availability of a CSAM catalog.
  3707.     dsamRecordCID ->  recordID for the CSAM serving this catalog
  3708.     directoryName ->  name of the catalog
  3709.     discriminator -> discriminator for the catalog
  3710.     directoryRecordCID -> If the call is successful, creationID for the record will
  3711.                             be returned.
  3712. */
  3713.  
  3714. struct DirAddDSAMDirectoryPB {
  3715.     void *                            qLink;
  3716.     long                             reserved1;
  3717.     long                             reserved2;
  3718.     DirIOCompletionUPP                 ioCompletion;
  3719.     OSErr                             ioResult;
  3720.     unsigned long                     saveA5;
  3721.     short                             reqCode;
  3722.     long                             reserved[2];
  3723.     AddrBlock                         serverHint;
  3724.     short                             dsRefNum;
  3725.     unsigned long                     callID;
  3726.     AuthIdentity                     identity;
  3727.     long                             gReserved1;
  3728.     long                             gReserved2;
  3729.     long                             gReserved3;
  3730.     long                             clientData;
  3731.     CreationID                         dsamRecordCID;                /*  --> CreationID for the CSAM record */
  3732.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  3733.     DirDiscriminator                 discriminator;                /*  --> catalog discriminator */
  3734.     DirGestalt                         features;                    /*  --> capabilty flags for the catalog */
  3735.     CreationID                         directoryRecordCID;            /* <--  creationID for the catalog record */
  3736. };
  3737. typedef struct DirAddDSAMDirectoryPB    DirAddDSAMDirectoryPB;
  3738. /*
  3739. DirRemoveDirectory: This call can be used to inform the toolbox that
  3740. catalog specified by 'directoryRecordCID'
  3741. */
  3742.  
  3743. struct DirRemoveDirectoryPB {
  3744.     void *                            qLink;
  3745.     long                             reserved1;
  3746.     long                             reserved2;
  3747.     DirIOCompletionUPP                 ioCompletion;
  3748.     OSErr                             ioResult;
  3749.     unsigned long                     saveA5;
  3750.     short                             reqCode;
  3751.     long                             reserved[2];
  3752.     AddrBlock                         serverHint;
  3753.     short                             dsRefNum;
  3754.     unsigned long                     callID;
  3755.     AuthIdentity                     identity;
  3756.     long                             gReserved1;
  3757.     long                             gReserved2;
  3758.     long                             gReserved3;
  3759.     long                             clientData;
  3760.     CreationID                         directoryRecordCID;            /*  --> creationID for the catalog record */
  3761. };
  3762. typedef struct DirRemoveDirectoryPB        DirRemoveDirectoryPB;
  3763. /*
  3764.  * DSGetExtendedDirectoriesInfo::  This call can be used to get
  3765.  * the information of various foreign catalogs supported.
  3766.  * Typically a DE Template  may make this call to create a
  3767.  * Address template or a Gateway may make this call to findout
  3768.  * catalog name space in which MSAM may would support. 
  3769.  * Client will supply a buffer pointed by 'bufferPtr' of size 'bufferLength'. 
  3770.  * When the call completes with 'daMoreData' error, client can examine 'totalEntries'
  3771.  * returned and reissue the call with increaing buffer.
  3772.  * Toolbox will findout the private information of each of the Foreign Catalogs
  3773.  * by polling CSAM's, Gateways, and MnMServers. The Information returned
  3774.  * for each catalog will be packed in the format: 
  3775.  * typedef struct EachDirectoryData {
  3776.  *  PackedRLI                        pRLI;           //  packed RLI for the catalog
  3777.  *  OSType                            entnType;        //  Entn Type
  3778.  *  long                            hasMailSlot;   //  If this catalog has mail slot this will be 1 otherwise zero
  3779.  *    ProtoRString                    RealName;      //  Packed RString for Real Name (padded to even boundary) 
  3780.  *    ProtoRString                    comment;       //  Packed RString holding any comment for Display (padded to even boundary)
  3781.  *    long                            length;        //  data length
  3782.  *    char                            data[length];  //  data padded to even boundary
  3783.  * };
  3784.  *
  3785.  *
  3786.  *
  3787.  * typedef struct myData {
  3788.  *      EachDirectoryData    data[numberOfEntries];    // data packed in the above format
  3789.  *    };
  3790.  *
  3791.  */
  3792.  
  3793. struct DirGetExtendedDirectoriesInfoPB {
  3794.     void *                            qLink;
  3795.     long                             reserved1;
  3796.     long                             reserved2;
  3797.     DirIOCompletionUPP                 ioCompletion;
  3798.     OSErr                             ioResult;
  3799.     unsigned long                     saveA5;
  3800.     short                             reqCode;
  3801.     long                             reserved[2];
  3802.     AddrBlock                         serverHint;
  3803.     short                             dsRefNum;
  3804.     unsigned long                     callID;
  3805.     AuthIdentity                     identity;
  3806.     long                             gReserved1;
  3807.     long                             gReserved2;
  3808.     long                             gReserved3;
  3809.     long                             clientData;
  3810.     void *                            buffer;                        /*  --> Pointer to a buufer where data will be returned */
  3811.     unsigned long                     bufferSize;                    /*  --> Length of the buffer, Length of actual data will be returned here */
  3812.     unsigned long                     totalEntries;                /* <--  Total Number of Catalogs found */
  3813.     unsigned long                     actualEntries;                /* <--  Total Number of Catalogs entries returned */
  3814. };
  3815. typedef struct DirGetExtendedDirectoriesInfoPB DirGetExtendedDirectoriesInfoPB;
  3816. /*
  3817. DirGetDirectoryIconPB: With this call a client can find out about
  3818. the icons supported by the Catalog.
  3819. Both ADAP and Personal Catalog will not support this call for now.
  3820. A CSAM can support a call so that DE Extension can use this
  3821. call to find appropriate Icons.
  3822.  
  3823. Returns kOCEBufferTooSmall if icon is too small, but will update iconSize.
  3824. */
  3825.  
  3826. struct DirGetDirectoryIconPB {
  3827.     void *                            qLink;
  3828.     long                             reserved1;
  3829.     long                             reserved2;
  3830.     DirIOCompletionUPP                 ioCompletion;
  3831.     OSErr                             ioResult;
  3832.     unsigned long                     saveA5;
  3833.     short                             reqCode;
  3834.     long                             reserved[2];
  3835.     AddrBlock                         serverHint;
  3836.     short                             dsRefNum;
  3837.     unsigned long                     callID;
  3838.     AuthIdentity                     identity;
  3839.     long                             gReserved1;
  3840.     long                             gReserved2;
  3841.     long                             gReserved3;
  3842.     long                             clientData;
  3843.     PackedRLIPtr                     pRLI;                        /*  --> packed RLI for the catalog */
  3844.     OSType                             iconType;                    /*  --> Type of Icon requested */
  3845.     void *                            iconBuffer;                    /*  --> Buffer to hold Icon Data */
  3846.     unsigned long                     bufferSize;                    /*  <-> size of buffer to hold icon data */
  3847. };
  3848. typedef struct DirGetDirectoryIconPB    DirGetDirectoryIconPB;
  3849. /*
  3850. DirGetOCESetupRefNum: This call will return 'dsRefnum' for the OCE Setup Personal Catalog
  3851. and oceSetupRecordCID for the oceSetup Record.
  3852. Clients interested in manipulating OCE Setup Personal Catalog directly should
  3853. make this call to get 'dsRefNum'.
  3854. 'dsRefNum' will be returned in the standard field in the DirParamHeader.
  3855. */
  3856.  
  3857. struct DirGetOCESetupRefNumPB {
  3858.     void *                            qLink;
  3859.     long                             reserved1;
  3860.     long                             reserved2;
  3861.     DirIOCompletionUPP                 ioCompletion;
  3862.     OSErr                             ioResult;
  3863.     unsigned long                     saveA5;
  3864.     short                             reqCode;
  3865.     long                             reserved[2];
  3866.     AddrBlock                         serverHint;
  3867.     short                             dsRefNum;
  3868.     unsigned long                     callID;
  3869.     AuthIdentity                     identity;
  3870.     long                             gReserved1;
  3871.     long                             gReserved2;
  3872.     long                             gReserved3;
  3873.     long                             clientData;
  3874.     CreationID                         oceSetupRecordCID;            /* --> creationID for the catalog record */
  3875. };
  3876. typedef struct DirGetOCESetupRefNumPB    DirGetOCESetupRefNumPB;
  3877.  
  3878. /*****************************************************************************/
  3879. /* Catalog and Authentication control blocks and operation definitions */
  3880.  
  3881. union AuthParamBlock {
  3882.     struct {
  3883.         void *                            qLink;
  3884.         long                             reserved1;
  3885.         long                             reserved2;
  3886.         AuthIOCompletionUPP             ioCompletion;
  3887.         OSErr                             ioResult;
  3888.         unsigned long                     saveA5;
  3889.         short                             reqCode;
  3890.         long                             reserved[2];
  3891.         AddrBlock                         serverHint;
  3892.         short                             dsRefNum;
  3893.         unsigned long                     callID;
  3894.         AuthIdentity                     identity;
  3895.         long                             gReserved1;
  3896.         long                             gReserved2;
  3897.         long                             gReserved3;
  3898.         long                             clientData;
  3899.     }                                 header;
  3900.     AuthBindSpecificIdentityPB         bindIdentityPB;
  3901.     AuthUnbindSpecificIdentityPB     unbindIdentityPB;
  3902.     AuthResolveCreationIDPB         resolveCreationIDPB;
  3903.     AuthGetSpecificIdentityInfoPB     getIdentityInfoPB;
  3904.     AuthAddKeyPB                     addKeyPB;
  3905.     AuthChangeKeyPB                 changeKeyPB;
  3906.     AuthDeleteKeyPB                 deleteKeyPB;
  3907.     AuthPasswordToKeyPB             passwordToKeyPB;
  3908.     AuthGetCredentialsPB             getCredentialsPB;
  3909.     AuthDecryptCredentialsPB         decryptCredentialsPB;
  3910.     AuthMakeChallengePB             makeChallengePB;
  3911.     AuthMakeReplyPB                 makeReplyPB;
  3912.     AuthVerifyReplyPB                 verifyReplyPB;
  3913.     AuthGetUTCTimePB                 getUTCTimePB;
  3914.     AuthMakeProxyPB                 makeProxyPB;
  3915.     AuthTradeProxyForCredentialsPB     tradeProxyForCredentialsPB;
  3916.     AuthGetLocalIdentityPB             getLocalIdentityPB;
  3917.     AuthUnlockLocalIdentityPB         unLockLocalIdentityPB;
  3918.     AuthLockLocalIdentityPB         lockLocalIdentityPB;
  3919.     AuthAddToLocalIdentityQueuePB     localIdentityQInstallPB;
  3920.     AuthRemoveFromLocalIdentityQueuePB  localIdentityQRemovePB;
  3921.     AuthSetupLocalIdentityPB         setupLocalIdentityPB;
  3922.     AuthChangeLocalIdentityPB         changeLocalIdentityPB;
  3923.     AuthRemoveLocalIdentityPB         removeLocalIdentityPB;
  3924.     OCESetupAddDirectoryInfoPB         setupDirectoryIdentityPB;
  3925.     OCESetupChangeDirectoryInfoPB     changeDirectoryIdentityPB;
  3926.     OCESetupRemoveDirectoryInfoPB     removeDirectoryIdentityPB;
  3927.     OCESetupGetDirectoryInfoPB         getDirectoryIdentityInfoPB;
  3928. };
  3929.  
  3930.  
  3931. union DirParamBlock {
  3932.     struct {
  3933.         void *                            qLink;
  3934.         long                             reserved1;
  3935.         long                             reserved2;
  3936.         DirIOCompletionUPP                 ioCompletion;
  3937.         OSErr                             ioResult;
  3938.         unsigned long                     saveA5;
  3939.         short                             reqCode;
  3940.         long                             reserved[2];
  3941.         AddrBlock                         serverHint;
  3942.         short                             dsRefNum;
  3943.         unsigned long                     callID;
  3944.         AuthIdentity                     identity;
  3945.         long                             gReserved1;
  3946.         long                             gReserved2;
  3947.         long                             gReserved3;
  3948.         long                             clientData;
  3949.     }                                 header;
  3950.     DirAddRecordPB                     addRecordPB;
  3951.     DirDeleteRecordPB                 deleteRecordPB;
  3952.     DirEnumerateGetPB                 enumerateGetPB;
  3953.     DirEnumerateParsePB             enumerateParsePB;
  3954.     DirFindRecordGetPB                 findRecordGetPB;
  3955.     DirFindRecordParsePB             findRecordParsePB;
  3956.     DirLookupGetPB                     lookupGetPB;
  3957.     DirLookupParsePB                 lookupParsePB;
  3958.     DirAddAttributeValuePB             addAttributeValuePB;
  3959.     DirDeleteAttributeTypePB         deleteAttributeTypePB;
  3960.     DirDeleteAttributeValuePB         deleteAttributeValuePB;
  3961.     DirChangeAttributeValuePB         changeAttributeValuePB;
  3962.     DirVerifyAttributeValuePB         verifyAttributeValuePB;
  3963.     DirFindValuePB                     findValuePB;
  3964.     DirEnumeratePseudonymGetPB         enumeratePseudonymGetPB;
  3965.     DirEnumeratePseudonymParsePB     enumeratePseudonymParsePB;
  3966.     DirAddPseudonymPB                 addPseudonymPB;
  3967.     DirDeletePseudonymPB             deletePseudonymPB;
  3968.     DirAddAliasPB                     addAliasPB;
  3969.     DirEnumerateAttributeTypesGetPB  enumerateAttributeTypesGetPB;
  3970.     DirEnumerateAttributeTypesParsePB  enumerateAttributeTypesParsePB;
  3971.     DirGetNameAndTypePB             getNameAndTypePB;
  3972.     DirSetNameAndTypePB             setNameAndTypePB;
  3973.     DirGetRecordMetaInfoPB             getRecordMetaInfoPB;
  3974.     DirGetDNodeMetaInfoPB             getDNodeMetaInfoPB;
  3975.     DirGetDirectoryInfoPB             getDirectoryInfoPB;
  3976.  
  3977.     DirGetDNodeAccessControlGetPB     getDNodeAccessControlGetPB;
  3978.     DirGetDNodeAccessControlParsePB  getDNodeAccessControlParsePB;
  3979.  
  3980.     DirGetRecordAccessControlGetPB     getRecordAccessControlGetPB;
  3981.     DirGetRecordAccessControlParsePB  getRecordAccessControlParsePB;
  3982.  
  3983.     DirGetAttributeAccessControlGetPB  getAttributeAccessControlGetPB;
  3984.     DirGetAttributeAccessControlParsePB  getAttributeAccessControlParsePB;
  3985.  
  3986.  
  3987.     DirEnumerateDirectoriesGetPB     enumerateDirectoriesGetPB;
  3988.     DirEnumerateDirectoriesParsePB     enumerateDirectoriesParsePB;
  3989.  
  3990.     DirAddADAPDirectoryPB             addADAPDirectoryPB;
  3991.     DirRemoveDirectoryPB             removeDirectoryPB;
  3992.     DirNetSearchADAPDirectoriesGetPB  netSearchADAPDirectoriesGetPB;
  3993.     DirNetSearchADAPDirectoriesParsePB  netSearchADAPDirectoriesParsePB;
  3994.     DirFindADAPDirectoryByNetSearchPB  findADAPDirectoryByNetSearchPB;
  3995.  
  3996.  
  3997.     DirMapDNodeNumberToPathNamePB     mapDNodeNumberToPathNamePB;
  3998.     DirMapPathNameToDNodeNumberPB     mapPathNameToDNodeNumberPB;
  3999.     DirGetLocalNetworkSpecPB         getLocalNetworkSpecPB;
  4000.     DirGetDNodeInfoPB                 getDNodeInfoPB;
  4001.  
  4002.     DirCreatePersonalDirectoryPB     createPersonalDirectoryPB;
  4003.     DirOpenPersonalDirectoryPB         openPersonalDirectoryPB;
  4004.     DirClosePersonalDirectoryPB     closePersonalDirectoryPB;
  4005.     DirMakePersonalDirectoryRLIPB     makePersonalDirectoryRLIPB;
  4006.  
  4007.     DirAddDSAMPB                     addDSAMPB;
  4008.     DirInstantiateDSAMPB             instantiateDSAMPB;
  4009.     DirRemoveDSAMPB                 removeDSAMPB;
  4010.     DirAddDSAMDirectoryPB             addDSAMDirectoryPB;
  4011.     DirGetExtendedDirectoriesInfoPB  getExtendedDirectoriesInfoPB;
  4012.     DirGetDirectoryIconPB             getDirectoryIconPB;
  4013.  
  4014.     DirGetOCESetupRefNumPB             dirGetOCESetupRefNumPB;
  4015.  
  4016.     DirAbortPB                         abortPB;
  4017. };
  4018.  
  4019. #if OPAQUE_UPP_TYPES
  4020.     EXTERN_API(AuthIOCompletionUPP)
  4021.     NewAuthIOCompletionUPP           (AuthIOCompletionProcPtr    userRoutine);
  4022.  
  4023.     EXTERN_API(NotificationUPP)
  4024.     NewNotificationUPP               (NotificationProcPtr        userRoutine);
  4025.  
  4026.     EXTERN_API(DirIOCompletionUPP)
  4027.     NewDirIOCompletionUPP           (DirIOCompletionProcPtr    userRoutine);
  4028.  
  4029.     EXTERN_API(ForEachDirEnumSpecUPP)
  4030.     NewForEachDirEnumSpecUPP       (ForEachDirEnumSpecProcPtr userRoutine);
  4031.  
  4032.     EXTERN_API(ForEachRecordUPP)
  4033.     NewForEachRecordUPP               (ForEachRecordProcPtr    userRoutine);
  4034.  
  4035.     EXTERN_API(ForEachLookupRecordIDUPP)
  4036.     NewForEachLookupRecordIDUPP       (ForEachLookupRecordIDProcPtr userRoutine);
  4037.  
  4038.     EXTERN_API(ForEachAttrTypeLookupUPP)
  4039.     NewForEachAttrTypeLookupUPP       (ForEachAttrTypeLookupProcPtr userRoutine);
  4040.  
  4041.     EXTERN_API(ForEachAttrValueUPP)
  4042.     NewForEachAttrValueUPP           (ForEachAttrValueProcPtr    userRoutine);
  4043.  
  4044.     EXTERN_API(ForEachAttrTypeUPP)
  4045.     NewForEachAttrTypeUPP           (ForEachAttrTypeProcPtr    userRoutine);
  4046.  
  4047.     EXTERN_API(ForEachRecordIDUPP)
  4048.     NewForEachRecordIDUPP           (ForEachRecordIDProcPtr    userRoutine);
  4049.  
  4050.     EXTERN_API(ForEachDirectoryUPP)
  4051.     NewForEachDirectoryUPP           (ForEachDirectoryProcPtr    userRoutine);
  4052.  
  4053.     EXTERN_API(ForEachADAPDirectoryUPP)
  4054.     NewForEachADAPDirectoryUPP       (ForEachADAPDirectoryProcPtr userRoutine);
  4055.  
  4056.     EXTERN_API(ForEachDNodeAccessControlUPP)
  4057.     NewForEachDNodeAccessControlUPP    (ForEachDNodeAccessControlProcPtr userRoutine);
  4058.  
  4059.     EXTERN_API(ForEachRecordAccessControlUPP)
  4060.     NewForEachRecordAccessControlUPP    (ForEachRecordAccessControlProcPtr userRoutine);
  4061.  
  4062.     EXTERN_API(ForEachAttributeAccessControlUPP)
  4063.     NewForEachAttributeAccessControlUPP    (ForEachAttributeAccessControlProcPtr userRoutine);
  4064.  
  4065.     EXTERN_API(DSAMDirUPP)
  4066.     NewDSAMDirUPP                   (DSAMDirProcPtr            userRoutine);
  4067.  
  4068.     EXTERN_API(DSAMDirParseUPP)
  4069.     NewDSAMDirParseUPP               (DSAMDirParseProcPtr        userRoutine);
  4070.  
  4071.     EXTERN_API(DSAMAuthUPP)
  4072.     NewDSAMAuthUPP                   (DSAMAuthProcPtr            userRoutine);
  4073.  
  4074.     EXTERN_API(void)
  4075.     DisposeAuthIOCompletionUPP       (AuthIOCompletionUPP        userUPP);
  4076.  
  4077.     EXTERN_API(void)
  4078.     DisposeNotificationUPP           (NotificationUPP            userUPP);
  4079.  
  4080.     EXTERN_API(void)
  4081.     DisposeDirIOCompletionUPP       (DirIOCompletionUPP        userUPP);
  4082.  
  4083.     EXTERN_API(void)
  4084.     DisposeForEachDirEnumSpecUPP    (ForEachDirEnumSpecUPP    userUPP);
  4085.  
  4086.     EXTERN_API(void)
  4087.     DisposeForEachRecordUPP           (ForEachRecordUPP        userUPP);
  4088.  
  4089.     EXTERN_API(void)
  4090.     DisposeForEachLookupRecordIDUPP    (ForEachLookupRecordIDUPP userUPP);
  4091.  
  4092.     EXTERN_API(void)
  4093.     DisposeForEachAttrTypeLookupUPP    (ForEachAttrTypeLookupUPP userUPP);
  4094.  
  4095.     EXTERN_API(void)
  4096.     DisposeForEachAttrValueUPP       (ForEachAttrValueUPP        userUPP);
  4097.  
  4098.     EXTERN_API(void)
  4099.     DisposeForEachAttrTypeUPP       (ForEachAttrTypeUPP        userUPP);
  4100.  
  4101.     EXTERN_API(void)
  4102.     DisposeForEachRecordIDUPP       (ForEachRecordIDUPP        userUPP);
  4103.  
  4104.     EXTERN_API(void)
  4105.     DisposeForEachDirectoryUPP       (ForEachDirectoryUPP        userUPP);
  4106.  
  4107.     EXTERN_API(void)
  4108.     DisposeForEachADAPDirectoryUPP    (ForEachADAPDirectoryUPP userUPP);
  4109.  
  4110.     EXTERN_API(void)
  4111.     DisposeForEachDNodeAccessControlUPP    (ForEachDNodeAccessControlUPP userUPP);
  4112.  
  4113.     EXTERN_API(void)
  4114.     DisposeForEachRecordAccessControlUPP    (ForEachRecordAccessControlUPP userUPP);
  4115.  
  4116.     EXTERN_API(void)
  4117.     DisposeForEachAttributeAccessControlUPP    (ForEachAttributeAccessControlUPP userUPP);
  4118.  
  4119.     EXTERN_API(void)
  4120.     DisposeDSAMDirUPP               (DSAMDirUPP                userUPP);
  4121.  
  4122.     EXTERN_API(void)
  4123.     DisposeDSAMDirParseUPP           (DSAMDirParseUPP            userUPP);
  4124.  
  4125.     EXTERN_API(void)
  4126.     DisposeDSAMAuthUPP               (DSAMAuthUPP                userUPP);
  4127.  
  4128.     EXTERN_API(void)
  4129.     InvokeAuthIOCompletionUPP       (AuthParamBlockPtr        paramBlock,
  4130.                                     AuthIOCompletionUPP        userUPP);
  4131.  
  4132.     EXTERN_API(Boolean)
  4133.     InvokeNotificationUPP           (long                    clientData,
  4134.                                     AuthLocalIdentityOp        callValue,
  4135.                                     AuthLocalIdentityLockAction actionValue,
  4136.                                     LocalIdentity            identity,
  4137.                                     NotificationUPP            userUPP);
  4138.  
  4139.     EXTERN_API(void)
  4140.     InvokeDirIOCompletionUPP       (DirParamBlockPtr        paramBlock,
  4141.                                     DirIOCompletionUPP        userUPP);
  4142.  
  4143.     EXTERN_API(Boolean)
  4144.     InvokeForEachDirEnumSpecUPP       (long                    clientData,
  4145.                                     const DirEnumSpec *        enumSpec,
  4146.                                     ForEachDirEnumSpecUPP    userUPP);
  4147.  
  4148.     EXTERN_API(Boolean)
  4149.     InvokeForEachRecordUPP           (long                    clientData,
  4150.                                     const DirEnumSpec *        enumSpec,
  4151.                                     PackedRLIPtr            pRLI,
  4152.                                     ForEachRecordUPP        userUPP);
  4153.  
  4154.     EXTERN_API(Boolean)
  4155.     InvokeForEachLookupRecordIDUPP    (long                    clientData,
  4156.                                     const RecordID *        recordID,
  4157.                                     ForEachLookupRecordIDUPP userUPP);
  4158.  
  4159.     EXTERN_API(Boolean)
  4160.     InvokeForEachAttrTypeLookupUPP    (long                    clientData,
  4161.                                     const AttributeType *    attrType,
  4162.                                     AccessMask                myAttrAccMask,
  4163.                                     ForEachAttrTypeLookupUPP userUPP);
  4164.  
  4165.     EXTERN_API(Boolean)
  4166.     InvokeForEachAttrValueUPP       (long                    clientData,
  4167.                                     const Attribute *        attribute,
  4168.                                     ForEachAttrValueUPP        userUPP);
  4169.  
  4170.     EXTERN_API(Boolean)
  4171.     InvokeForEachAttrTypeUPP       (long                    clientData,
  4172.                                     const AttributeType *    attrType,
  4173.                                     ForEachAttrTypeUPP        userUPP);
  4174.  
  4175.     EXTERN_API(Boolean)
  4176.     InvokeForEachRecordIDUPP       (long                    clientData,
  4177.                                     const RecordID *        recordID,
  4178.                                     ForEachRecordIDUPP        userUPP);
  4179.  
  4180.     EXTERN_API(Boolean)
  4181.     InvokeForEachDirectoryUPP       (long                    clientData,
  4182.                                     const DirectoryName *    dirName,
  4183.                                     const DirDiscriminator * discriminator,
  4184.                                     DirGestalt                features,
  4185.                                     ForEachDirectoryUPP        userUPP);
  4186.  
  4187.     EXTERN_API(Boolean)
  4188.     InvokeForEachADAPDirectoryUPP    (long                    clientData,
  4189.                                     const DirectoryName *    dirName,
  4190.                                     const DirDiscriminator * discriminator,
  4191.                                     DirGestalt                features,
  4192.                                     AddrBlock                serverHint,
  4193.                                     ForEachADAPDirectoryUPP    userUPP);
  4194.  
  4195.     EXTERN_API(Boolean)
  4196.     InvokeForEachDNodeAccessControlUPP    (long                clientData,
  4197.                                     const DSSpec *            dsObj,
  4198.                                     AccessMask                activeDnodeAccMask,
  4199.                                     AccessMask                defaultRecordAccMask,
  4200.                                     AccessMask                defaultAttributeAccMask,
  4201.                                     ForEachDNodeAccessControlUPP userUPP);
  4202.  
  4203.     EXTERN_API(Boolean)
  4204.     InvokeForEachRecordAccessControlUPP    (long            clientData,
  4205.                                     const DSSpec *            dsObj,
  4206.                                     AccessMask                activeDnodeAccMask,
  4207.                                     AccessMask                activeRecordAccMask,
  4208.                                     AccessMask                defaultAttributeAccMask,
  4209.                                     ForEachRecordAccessControlUPP userUPP);
  4210.  
  4211.     EXTERN_API(Boolean)
  4212.     InvokeForEachAttributeAccessControlUPP    (long            clientData,
  4213.                                     const DSSpec *            dsObj,
  4214.                                     AccessMask                activeDnodeAccMask,
  4215.                                     AccessMask                activeRecordAccMask,
  4216.                                     AccessMask                activeAttributeAccMask,
  4217.                                     ForEachAttributeAccessControlUPP userUPP);
  4218.  
  4219.     EXTERN_API(OSErr)
  4220.     InvokeDSAMDirUPP               (void *                    dsamData,
  4221.                                     DirParamBlockPtr        paramBlock,
  4222.                                     Boolean                    async,
  4223.                                     DSAMDirUPP                userUPP);
  4224.  
  4225.     EXTERN_API(OSErr)
  4226.     InvokeDSAMDirParseUPP           (void *                    dsamData,
  4227.                                     DirParamBlockPtr        paramBlock,
  4228.                                     Boolean                    async,
  4229.                                     DSAMDirParseUPP            userUPP);
  4230.  
  4231.     EXTERN_API(OSErr)
  4232.     InvokeDSAMAuthUPP               (void *                    dsamData,
  4233.                                     AuthParamBlockPtr        pb,
  4234.                                     Boolean                    async,
  4235.                                     DSAMAuthUPP                userUPP);
  4236.  
  4237. #else
  4238.     enum { uppAuthIOCompletionProcInfo = 0x00009802 };                 /* register no_return_value Func(4_bytes:A0) */
  4239.     enum { uppNotificationProcInfo = 0x00003FD0 };                     /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  4240.     enum { uppDirIOCompletionProcInfo = 0x00009802 };                 /* register no_return_value Func(4_bytes:A0) */
  4241.     enum { uppForEachDirEnumSpecProcInfo = 0x000003D0 };             /* pascal 1_byte Func(4_bytes, 4_bytes) */
  4242.     enum { uppForEachRecordProcInfo = 0x00000FD0 };                 /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes) */
  4243.     enum { uppForEachLookupRecordIDProcInfo = 0x000003D0 };         /* pascal 1_byte Func(4_bytes, 4_bytes) */
  4244.     enum { uppForEachAttrTypeLookupProcInfo = 0x00000FD0 };         /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes) */
  4245.     enum { uppForEachAttrValueProcInfo = 0x000003D0 };                 /* pascal 1_byte Func(4_bytes, 4_bytes) */
  4246.     enum { uppForEachAttrTypeProcInfo = 0x000003D0 };                 /* pascal 1_byte Func(4_bytes, 4_bytes) */
  4247.     enum { uppForEachRecordIDProcInfo = 0x000003D0 };                 /* pascal 1_byte Func(4_bytes, 4_bytes) */
  4248.     enum { uppForEachDirectoryProcInfo = 0x00003FD0 };                 /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  4249.     enum { uppForEachADAPDirectoryProcInfo = 0x0000FFD0 };             /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  4250.     enum { uppForEachDNodeAccessControlProcInfo = 0x0000FFD0 };     /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  4251.     enum { uppForEachRecordAccessControlProcInfo = 0x0000FFD0 };     /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  4252.     enum { uppForEachAttributeAccessControlProcInfo = 0x0000FFD0 };  /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  4253.     enum { uppDSAMDirProcInfo = 0x000007E0 };                         /* pascal 2_bytes Func(4_bytes, 4_bytes, 1_byte) */
  4254.     enum { uppDSAMDirParseProcInfo = 0x000007E0 };                     /* pascal 2_bytes Func(4_bytes, 4_bytes, 1_byte) */
  4255.     enum { uppDSAMAuthProcInfo = 0x000007E0 };                         /* pascal 2_bytes Func(4_bytes, 4_bytes, 1_byte) */
  4256.     #define NewAuthIOCompletionUPP(userRoutine)                     (AuthIOCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppAuthIOCompletionProcInfo, GetCurrentArchitecture())
  4257.     #define NewNotificationUPP(userRoutine)                         (NotificationUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNotificationProcInfo, GetCurrentArchitecture())
  4258.     #define NewDirIOCompletionUPP(userRoutine)                         (DirIOCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDirIOCompletionProcInfo, GetCurrentArchitecture())
  4259.     #define NewForEachDirEnumSpecUPP(userRoutine)                     (ForEachDirEnumSpecUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachDirEnumSpecProcInfo, GetCurrentArchitecture())
  4260.     #define NewForEachRecordUPP(userRoutine)                         (ForEachRecordUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachRecordProcInfo, GetCurrentArchitecture())
  4261.     #define NewForEachLookupRecordIDUPP(userRoutine)                 (ForEachLookupRecordIDUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachLookupRecordIDProcInfo, GetCurrentArchitecture())
  4262.     #define NewForEachAttrTypeLookupUPP(userRoutine)                 (ForEachAttrTypeLookupUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachAttrTypeLookupProcInfo, GetCurrentArchitecture())
  4263.     #define NewForEachAttrValueUPP(userRoutine)                     (ForEachAttrValueUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachAttrValueProcInfo, GetCurrentArchitecture())
  4264.     #define NewForEachAttrTypeUPP(userRoutine)                         (ForEachAttrTypeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachAttrTypeProcInfo, GetCurrentArchitecture())
  4265.     #define NewForEachRecordIDUPP(userRoutine)                         (ForEachRecordIDUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachRecordIDProcInfo, GetCurrentArchitecture())
  4266.     #define NewForEachDirectoryUPP(userRoutine)                     (ForEachDirectoryUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachDirectoryProcInfo, GetCurrentArchitecture())
  4267.     #define NewForEachADAPDirectoryUPP(userRoutine)                 (ForEachADAPDirectoryUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachADAPDirectoryProcInfo, GetCurrentArchitecture())
  4268.     #define NewForEachDNodeAccessControlUPP(userRoutine)             (ForEachDNodeAccessControlUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachDNodeAccessControlProcInfo, GetCurrentArchitecture())
  4269.     #define NewForEachRecordAccessControlUPP(userRoutine)             (ForEachRecordAccessControlUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachRecordAccessControlProcInfo, GetCurrentArchitecture())
  4270.     #define NewForEachAttributeAccessControlUPP(userRoutine)         (ForEachAttributeAccessControlUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachAttributeAccessControlProcInfo, GetCurrentArchitecture())
  4271.     #define NewDSAMDirUPP(userRoutine)                                 (DSAMDirUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDSAMDirProcInfo, GetCurrentArchitecture())
  4272.     #define NewDSAMDirParseUPP(userRoutine)                         (DSAMDirParseUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDSAMDirParseProcInfo, GetCurrentArchitecture())
  4273.     #define NewDSAMAuthUPP(userRoutine)                             (DSAMAuthUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDSAMAuthProcInfo, GetCurrentArchitecture())
  4274.     #define DisposeAuthIOCompletionUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  4275.     #define DisposeNotificationUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  4276.     #define DisposeDirIOCompletionUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  4277.     #define DisposeForEachDirEnumSpecUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  4278.     #define DisposeForEachRecordUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  4279.     #define DisposeForEachLookupRecordIDUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  4280.     #define DisposeForEachAttrTypeLookupUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  4281.     #define DisposeForEachAttrValueUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  4282.     #define DisposeForEachAttrTypeUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  4283.     #define DisposeForEachRecordIDUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  4284.     #define DisposeForEachDirectoryUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  4285.     #define DisposeForEachADAPDirectoryUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  4286.     #define DisposeForEachDNodeAccessControlUPP(userUPP)             DisposeRoutineDescriptor(userUPP)
  4287.     #define DisposeForEachRecordAccessControlUPP(userUPP)             DisposeRoutineDescriptor(userUPP)
  4288.     #define DisposeForEachAttributeAccessControlUPP(userUPP)         DisposeRoutineDescriptor(userUPP)
  4289.     #define DisposeDSAMDirUPP(userUPP)                                 DisposeRoutineDescriptor(userUPP)
  4290.     #define DisposeDSAMDirParseUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  4291.     #define DisposeDSAMAuthUPP(userUPP)                             DisposeRoutineDescriptor(userUPP)
  4292.     #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  4293.     #pragma parameter InvokeAuthIOCompletionUPP(__A0, __A1)
  4294.     void InvokeAuthIOCompletionUPP(AuthParamBlockPtr paramBlock, AuthIOCompletionUPP userUPP) = 0x4E91;
  4295.     #else
  4296.         #define InvokeAuthIOCompletionUPP(paramBlock, userUPP)             CALL_ONE_PARAMETER_UPP((userUPP), uppAuthIOCompletionProcInfo, (paramBlock))
  4297.     #endif
  4298.     #define InvokeNotificationUPP(clientData, callValue, actionValue, identity, userUPP)  (Boolean)CALL_FOUR_PARAMETER_UPP((userUPP), uppNotificationProcInfo, (clientData), (callValue), (actionValue), (identity))
  4299.     #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  4300.     #pragma parameter InvokeDirIOCompletionUPP(__A0, __A1)
  4301.     void InvokeDirIOCompletionUPP(DirParamBlockPtr paramBlock, DirIOCompletionUPP userUPP) = 0x4E91;
  4302.     #else
  4303.         #define InvokeDirIOCompletionUPP(paramBlock, userUPP)             CALL_ONE_PARAMETER_UPP((userUPP), uppDirIOCompletionProcInfo, (paramBlock))
  4304.     #endif
  4305.     #define InvokeForEachDirEnumSpecUPP(clientData, enumSpec, userUPP)  (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppForEachDirEnumSpecProcInfo, (clientData), (enumSpec))
  4306.     #define InvokeForEachRecordUPP(clientData, enumSpec, pRLI, userUPP)  (Boolean)CALL_THREE_PARAMETER_UPP((userUPP), uppForEachRecordProcInfo, (clientData), (enumSpec), (pRLI))
  4307.     #define InvokeForEachLookupRecordIDUPP(clientData, recordID, userUPP)  (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppForEachLookupRecordIDProcInfo, (clientData), (recordID))
  4308.     #define InvokeForEachAttrTypeLookupUPP(clientData, attrType, myAttrAccMask, userUPP)  (Boolean)CALL_THREE_PARAMETER_UPP((userUPP), uppForEachAttrTypeLookupProcInfo, (clientData), (attrType), (myAttrAccMask))
  4309.     #define InvokeForEachAttrValueUPP(clientData, attribute, userUPP)  (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppForEachAttrValueProcInfo, (clientData), (attribute))
  4310.     #define InvokeForEachAttrTypeUPP(clientData, attrType, userUPP)  (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppForEachAttrTypeProcInfo, (clientData), (attrType))
  4311.     #define InvokeForEachRecordIDUPP(clientData, recordID, userUPP)  (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppForEachRecordIDProcInfo, (clientData), (recordID))
  4312.     #define InvokeForEachDirectoryUPP(clientData, dirName, discriminator, features, userUPP)  (Boolean)CALL_FOUR_PARAMETER_UPP((userUPP), uppForEachDirectoryProcInfo, (clientData), (dirName), (discriminator), (features))
  4313.     #define InvokeForEachADAPDirectoryUPP(clientData, dirName, discriminator, features, serverHint, userUPP)  (Boolean)CALL_FIVE_PARAMETER_UPP((userUPP), uppForEachADAPDirectoryProcInfo, (clientData), (dirName), (discriminator), (features), (serverHint))
  4314.     #define InvokeForEachDNodeAccessControlUPP(clientData, dsObj, activeDnodeAccMask, defaultRecordAccMask, defaultAttributeAccMask, userUPP)  (Boolean)CALL_FIVE_PARAMETER_UPP((userUPP), uppForEachDNodeAccessControlProcInfo, (clientData), (dsObj), (activeDnodeAccMask), (defaultRecordAccMask), (defaultAttributeAccMask))
  4315.     #define InvokeForEachRecordAccessControlUPP(clientData, dsObj, activeDnodeAccMask, activeRecordAccMask, defaultAttributeAccMask, userUPP)  (Boolean)CALL_FIVE_PARAMETER_UPP((userUPP), uppForEachRecordAccessControlProcInfo, (clientData), (dsObj), (activeDnodeAccMask), (activeRecordAccMask), (defaultAttributeAccMask))
  4316.     #define InvokeForEachAttributeAccessControlUPP(clientData, dsObj, activeDnodeAccMask, activeRecordAccMask, activeAttributeAccMask, userUPP)  (Boolean)CALL_FIVE_PARAMETER_UPP((userUPP), uppForEachAttributeAccessControlProcInfo, (clientData), (dsObj), (activeDnodeAccMask), (activeRecordAccMask), (activeAttributeAccMask))
  4317.     #define InvokeDSAMDirUPP(dsamData, paramBlock, async, userUPP)     (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppDSAMDirProcInfo, (dsamData), (paramBlock), (async))
  4318.     #define InvokeDSAMDirParseUPP(dsamData, paramBlock, async, userUPP)  (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppDSAMDirParseProcInfo, (dsamData), (paramBlock), (async))
  4319.     #define InvokeDSAMAuthUPP(dsamData, pb, async, userUPP)         (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppDSAMAuthProcInfo, (dsamData), (pb), (async))
  4320. #endif
  4321. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  4322. #define NewAuthIOCompletionProc(userRoutine)                     NewAuthIOCompletionUPP(userRoutine)
  4323. #define NewNotificationProc(userRoutine)                         NewNotificationUPP(userRoutine)
  4324. #define NewDirIOCompletionProc(userRoutine)                     NewDirIOCompletionUPP(userRoutine)
  4325. #define NewForEachDirEnumSpecProc(userRoutine)                     NewForEachDirEnumSpecUPP(userRoutine)
  4326. #define NewForEachRecordProc(userRoutine)                         NewForEachRecordUPP(userRoutine)
  4327. #define NewForEachLookupRecordIDProc(userRoutine)                 NewForEachLookupRecordIDUPP(userRoutine)
  4328. #define NewForEachAttrTypeLookupProc(userRoutine)                 NewForEachAttrTypeLookupUPP(userRoutine)
  4329. #define NewForEachAttrValueProc(userRoutine)                     NewForEachAttrValueUPP(userRoutine)
  4330. #define NewForEachAttrTypeProc(userRoutine)                     NewForEachAttrTypeUPP(userRoutine)
  4331. #define NewForEachRecordIDProc(userRoutine)                     NewForEachRecordIDUPP(userRoutine)
  4332. #define NewForEachDirectoryProc(userRoutine)                     NewForEachDirectoryUPP(userRoutine)
  4333. #define NewForEachADAPDirectoryProc(userRoutine)                 NewForEachADAPDirectoryUPP(userRoutine)
  4334. #define NewForEachDNodeAccessControlProc(userRoutine)             NewForEachDNodeAccessControlUPP(userRoutine)
  4335. #define NewForEachRecordAccessControlProc(userRoutine)             NewForEachRecordAccessControlUPP(userRoutine)
  4336. #define NewForEachAttributeAccessControlProc(userRoutine)         NewForEachAttributeAccessControlUPP(userRoutine)
  4337. #define NewDSAMDirProc(userRoutine)                             NewDSAMDirUPP(userRoutine)
  4338. #define NewDSAMDirParseProc(userRoutine)                         NewDSAMDirParseUPP(userRoutine)
  4339. #define NewDSAMAuthProc(userRoutine)                             NewDSAMAuthUPP(userRoutine)
  4340. #define CallAuthIOCompletionProc(userRoutine, paramBlock)        InvokeAuthIOCompletionUPP(paramBlock, userRoutine)
  4341. #define CallNotificationProc(userRoutine, clientData, callValue, actionValue, identity) InvokeNotificationUPP(clientData, callValue, actionValue, identity, userRoutine)
  4342. #define CallDirIOCompletionProc(userRoutine, paramBlock)        InvokeDirIOCompletionUPP(paramBlock, userRoutine)
  4343. #define CallForEachDirEnumSpecProc(userRoutine, clientData, enumSpec) InvokeForEachDirEnumSpecUPP(clientData, enumSpec, userRoutine)
  4344. #define CallForEachRecordProc(userRoutine, clientData, enumSpec, pRLI) InvokeForEachRecordUPP(clientData, enumSpec, pRLI, userRoutine)
  4345. #define CallForEachLookupRecordIDProc(userRoutine, clientData, recordID) InvokeForEachLookupRecordIDUPP(clientData, recordID, userRoutine)
  4346. #define CallForEachAttrTypeLookupProc(userRoutine, clientData, attrType, myAttrAccMask) InvokeForEachAttrTypeLookupUPP(clientData, attrType, myAttrAccMask, userRoutine)
  4347. #define CallForEachAttrValueProc(userRoutine, clientData, attribute) InvokeForEachAttrValueUPP(clientData, attribute, userRoutine)
  4348. #define CallForEachAttrTypeProc(userRoutine, clientData, attrType) InvokeForEachAttrTypeUPP(clientData, attrType, userRoutine)
  4349. #define CallForEachRecordIDProc(userRoutine, clientData, recordID) InvokeForEachRecordIDUPP(clientData, recordID, userRoutine)
  4350. #define CallForEachDirectoryProc(userRoutine, clientData, dirName, discriminator, features) InvokeForEachDirectoryUPP(clientData, dirName, discriminator, features, userRoutine)
  4351. #define CallForEachADAPDirectoryProc(userRoutine, clientData, dirName, discriminator, features, serverHint) InvokeForEachADAPDirectoryUPP(clientData, dirName, discriminator, features, serverHint, userRoutine)
  4352. #define CallForEachDNodeAccessControlProc(userRoutine, clientData, dsObj, activeDnodeAccMask, defaultRecordAccMask, defaultAttributeAccMask) InvokeForEachDNodeAccessControlUPP(clientData, dsObj, activeDnodeAccMask, defaultRecordAccMask, defaultAttributeAccMask, userRoutine)
  4353. #define CallForEachRecordAccessControlProc(userRoutine, clientData, dsObj, activeDnodeAccMask, activeRecordAccMask, defaultAttributeAccMask) InvokeForEachRecordAccessControlUPP(clientData, dsObj, activeDnodeAccMask, activeRecordAccMask, defaultAttributeAccMask, userRoutine)
  4354. #define CallForEachAttributeAccessControlProc(userRoutine, clientData, dsObj, activeDnodeAccMask, activeRecordAccMask, activeAttributeAccMask) InvokeForEachAttributeAccessControlUPP(clientData, dsObj, activeDnodeAccMask, activeRecordAccMask, activeAttributeAccMask, userRoutine)
  4355. #define CallDSAMDirProc(userRoutine, dsamData, paramBlock, async) InvokeDSAMDirUPP(dsamData, paramBlock, async, userRoutine)
  4356. #define CallDSAMDirParseProc(userRoutine, dsamData, paramBlock, async) InvokeDSAMDirParseUPP(dsamData, paramBlock, async, userRoutine)
  4357. #define CallDSAMAuthProc(userRoutine, dsamData, pb, async)        InvokeDSAMAuthUPP(dsamData, pb, async, userRoutine)
  4358. EXTERN_API( OSErr )
  4359. AuthBindSpecificIdentity        (AuthParamBlockPtr         paramBlock,
  4360.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0200, 0xAA5E);
  4361.  
  4362. EXTERN_API( OSErr )
  4363. AuthUnbindSpecificIdentity        (AuthParamBlockPtr         paramBlock,
  4364.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0201, 0xAA5E);
  4365.  
  4366. EXTERN_API( OSErr )
  4367. AuthResolveCreationID            (AuthParamBlockPtr         paramBlock,
  4368.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0202, 0xAA5E);
  4369.  
  4370. EXTERN_API( OSErr )
  4371. AuthGetSpecificIdentityInfo        (AuthParamBlockPtr         paramBlock,
  4372.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0203, 0xAA5E);
  4373.  
  4374. EXTERN_API( OSErr )
  4375. AuthAddKey                        (AuthParamBlockPtr         paramBlock,
  4376.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0207, 0xAA5E);
  4377.  
  4378. EXTERN_API( OSErr )
  4379. AuthChangeKey                    (AuthParamBlockPtr         paramBlock,
  4380.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0208, 0xAA5E);
  4381.  
  4382. EXTERN_API( OSErr )
  4383. AuthDeleteKey                    (AuthParamBlockPtr         paramBlock,
  4384.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0209, 0xAA5E);
  4385.  
  4386. EXTERN_API( OSErr )
  4387. AuthPasswordToKey                (AuthParamBlockPtr         paramBlock,
  4388.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x020A, 0xAA5E);
  4389.  
  4390. EXTERN_API( OSErr )
  4391. AuthGetCredentials                (AuthParamBlockPtr         paramBlock,
  4392.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x020B, 0xAA5E);
  4393.  
  4394. EXTERN_API( OSErr )
  4395. AuthDecryptCredentials            (AuthParamBlockPtr         paramBlock,
  4396.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x020C, 0xAA5E);
  4397.  
  4398. EXTERN_API( OSErr )
  4399. AuthMakeChallenge                (AuthParamBlockPtr         paramBlock,
  4400.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x020F, 0xAA5E);
  4401.  
  4402. EXTERN_API( OSErr )
  4403. AuthMakeReply                    (AuthParamBlockPtr         paramBlock,
  4404.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0210, 0xAA5E);
  4405.  
  4406. EXTERN_API( OSErr )
  4407. AuthVerifyReply                    (AuthParamBlockPtr         paramBlock,
  4408.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0211, 0xAA5E);
  4409.  
  4410. EXTERN_API( OSErr )
  4411. AuthGetUTCTime                    (AuthParamBlockPtr         paramBlock,
  4412.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x021A, 0xAA5E);
  4413.  
  4414. EXTERN_API( OSErr )
  4415. AuthMakeProxy                    (AuthParamBlockPtr         paramBlock,
  4416.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0212, 0xAA5E);
  4417.  
  4418. EXTERN_API( OSErr )
  4419. AuthTradeProxyForCredentials    (AuthParamBlockPtr         paramBlock,
  4420.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0213, 0xAA5E);
  4421.  
  4422. /* Local Identity API */
  4423. EXTERN_API( OSErr )
  4424. AuthGetLocalIdentity            (AuthParamBlockPtr         paramBlock,
  4425.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0204, 0xAA5E);
  4426.  
  4427. EXTERN_API( OSErr )
  4428. AuthUnlockLocalIdentity            (AuthParamBlockPtr         paramBlock,
  4429.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0214, 0xAA5E);
  4430.  
  4431. EXTERN_API( OSErr )
  4432. AuthLockLocalIdentity            (AuthParamBlockPtr         paramBlock,
  4433.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0215, 0xAA5E);
  4434.  
  4435. EXTERN_API( OSErr )
  4436. AuthAddToLocalIdentityQueue        (AuthParamBlockPtr         paramBlock,
  4437.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0205, 0xAA5E);
  4438.  
  4439. EXTERN_API( OSErr )
  4440. AuthRemoveFromLocalIdentityQueue (AuthParamBlockPtr     paramBlock,
  4441.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0206, 0xAA5E);
  4442.  
  4443. EXTERN_API( OSErr )
  4444. AuthSetupLocalIdentity            (AuthParamBlockPtr         paramBlock,
  4445.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0216, 0xAA5E);
  4446.  
  4447. EXTERN_API( OSErr )
  4448. AuthChangeLocalIdentity            (AuthParamBlockPtr         paramBlock,
  4449.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0217, 0xAA5E);
  4450.  
  4451. EXTERN_API( OSErr )
  4452. AuthRemoveLocalIdentity            (AuthParamBlockPtr         paramBlock,
  4453.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0218, 0xAA5E);
  4454.  
  4455. EXTERN_API( OSErr )
  4456. DirAddRecord                    (DirParamBlockPtr         paramBlock,
  4457.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0109, 0xAA5E);
  4458.  
  4459. EXTERN_API( OSErr )
  4460. DirDeleteRecord                    (DirParamBlockPtr         paramBlock,
  4461.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x010A, 0xAA5E);
  4462.  
  4463. EXTERN_API( OSErr )
  4464. DirEnumerateGet                    (DirParamBlockPtr         paramBlock,
  4465.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0111, 0xAA5E);
  4466.  
  4467. EXTERN_API( OSErr )
  4468. DirEnumerateParse                (DirParamBlockPtr         paramBlock,
  4469.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0101, 0xAA5E);
  4470.  
  4471. EXTERN_API( OSErr )
  4472. DirFindRecordGet                (DirParamBlockPtr         paramBlock,
  4473.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0140, 0xAA5E);
  4474.  
  4475. EXTERN_API( OSErr )
  4476. DirFindRecordParse                (DirParamBlockPtr         paramBlock,
  4477.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0141, 0xAA5E);
  4478.  
  4479. EXTERN_API( OSErr )
  4480. DirLookupGet                    (DirParamBlockPtr         paramBlock,
  4481.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0117, 0xAA5E);
  4482.  
  4483. EXTERN_API( OSErr )
  4484. DirLookupParse                    (DirParamBlockPtr         paramBlock,
  4485.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0102, 0xAA5E);
  4486.  
  4487. EXTERN_API( OSErr )
  4488. DirAddAttributeValue            (DirParamBlockPtr         paramBlock,
  4489.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x010B, 0xAA5E);
  4490.  
  4491. EXTERN_API( OSErr )
  4492. DirDeleteAttributeValue            (DirParamBlockPtr         paramBlock,
  4493.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x010C, 0xAA5E);
  4494.  
  4495. EXTERN_API( OSErr )
  4496. DirDeleteAttributeType            (DirParamBlockPtr         paramBlock,
  4497.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0130, 0xAA5E);
  4498.  
  4499. EXTERN_API( OSErr )
  4500. DirChangeAttributeValue            (DirParamBlockPtr         paramBlock,
  4501.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x010D, 0xAA5E);
  4502.  
  4503. EXTERN_API( OSErr )
  4504. DirVerifyAttributeValue            (DirParamBlockPtr         paramBlock,
  4505.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x010E, 0xAA5E);
  4506.  
  4507. EXTERN_API( OSErr )
  4508. DirFindValue                    (DirParamBlockPtr         paramBlock,
  4509.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0126, 0xAA5E);
  4510.  
  4511. EXTERN_API( OSErr )
  4512. DirEnumerateAttributeTypesGet    (DirParamBlockPtr         paramBlock,
  4513.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0112, 0xAA5E);
  4514.  
  4515. EXTERN_API( OSErr )
  4516. DirEnumerateAttributeTypesParse    (DirParamBlockPtr         paramBlock,
  4517.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0103, 0xAA5E);
  4518.  
  4519. EXTERN_API( OSErr )
  4520. DirAddPseudonym                    (DirParamBlockPtr         paramBlock,
  4521.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x010F, 0xAA5E);
  4522.  
  4523. EXTERN_API( OSErr )
  4524. DirDeletePseudonym                (DirParamBlockPtr         paramBlock,
  4525.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0110, 0xAA5E);
  4526.  
  4527. EXTERN_API( OSErr )
  4528. DirAddAlias                        (DirParamBlockPtr         paramBlock,
  4529.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x011C, 0xAA5E);
  4530.  
  4531. EXTERN_API( OSErr )
  4532. DirEnumeratePseudonymGet        (DirParamBlockPtr         paramBlock,
  4533.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0113, 0xAA5E);
  4534.  
  4535. EXTERN_API( OSErr )
  4536. DirEnumeratePseudonymParse        (DirParamBlockPtr         paramBlock,
  4537.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0104, 0xAA5E);
  4538.  
  4539. EXTERN_API( OSErr )
  4540. DirGetNameAndType                (DirParamBlockPtr         paramBlock,
  4541.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0114, 0xAA5E);
  4542.  
  4543. EXTERN_API( OSErr )
  4544. DirSetNameAndType                (DirParamBlockPtr         paramBlock,
  4545.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0115, 0xAA5E);
  4546.  
  4547. EXTERN_API( OSErr )
  4548. DirGetRecordMetaInfo            (DirParamBlockPtr         paramBlock,
  4549.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0116, 0xAA5E);
  4550.  
  4551. EXTERN_API( OSErr )
  4552. DirGetDNodeMetaInfo                (DirParamBlockPtr         paramBlock,
  4553.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0118, 0xAA5E);
  4554.  
  4555. EXTERN_API( OSErr )
  4556. DirGetDirectoryInfo                (DirParamBlockPtr         paramBlock,
  4557.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0119, 0xAA5E);
  4558.  
  4559. EXTERN_API( OSErr )
  4560. DirGetDNodeAccessControlGet        (DirParamBlockPtr         paramBlock,
  4561.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x012A, 0xAA5E);
  4562.  
  4563. EXTERN_API( OSErr )
  4564. DirGetDNodeAccessControlParse    (DirParamBlockPtr         paramBlock,
  4565.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x012F, 0xAA5E);
  4566.  
  4567. EXTERN_API( OSErr )
  4568. DirGetRecordAccessControlGet    (DirParamBlockPtr         paramBlock,
  4569.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x012C, 0xAA5E);
  4570.  
  4571. EXTERN_API( OSErr )
  4572. DirGetRecordAccessControlParse    (DirParamBlockPtr         paramBlock,
  4573.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0134, 0xAA5E);
  4574.  
  4575. EXTERN_API( OSErr )
  4576. DirGetAttributeAccessControlGet    (DirParamBlockPtr         paramBlock,
  4577.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x012E, 0xAA5E);
  4578.  
  4579. EXTERN_API( OSErr )
  4580. DirGetAttributeAccessControlParse (DirParamBlockPtr     paramBlock,
  4581.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0138, 0xAA5E);
  4582.  
  4583. EXTERN_API( OSErr )
  4584. DirEnumerateDirectoriesGet        (DirParamBlockPtr         paramBlock,
  4585.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x011A, 0xAA5E);
  4586.  
  4587. EXTERN_API( OSErr )
  4588. DirEnumerateDirectoriesParse    (DirParamBlockPtr         paramBlock,
  4589.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0106, 0xAA5E);
  4590.  
  4591. EXTERN_API( OSErr )
  4592. DirMapPathNameToDNodeNumber        (DirParamBlockPtr         paramBlock,
  4593.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0122, 0xAA5E);
  4594.  
  4595. EXTERN_API( OSErr )
  4596. DirMapDNodeNumberToPathName        (DirParamBlockPtr         paramBlock,
  4597.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0123, 0xAA5E);
  4598.  
  4599.  
  4600. EXTERN_API( OSErr )
  4601. DirGetLocalNetworkSpec            (DirParamBlockPtr         paramBlock,
  4602.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0124, 0xAA5E);
  4603.  
  4604. EXTERN_API( OSErr )
  4605. DirGetDNodeInfo                    (DirParamBlockPtr         paramBlock,
  4606.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0125, 0xAA5E);
  4607.  
  4608.  
  4609. /*  Trap Dispatchers for Personal Catalog and CSAM Extensions */
  4610. EXTERN_API( OSErr )
  4611. DirCreatePersonalDirectory        (DirParamBlockPtr         paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x011F, 0xAA5E);
  4612.  
  4613. EXTERN_API( OSErr )
  4614. DirOpenPersonalDirectory        (DirParamBlockPtr         paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x011E, 0xAA5E);
  4615.  
  4616. EXTERN_API( OSErr )
  4617. DirClosePersonalDirectory        (DirParamBlockPtr         paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0131, 0xAA5E);
  4618.  
  4619. EXTERN_API( OSErr )
  4620. DirMakePersonalDirectoryRLI        (DirParamBlockPtr         paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0132, 0xAA5E);
  4621.  
  4622. EXTERN_API( OSErr )
  4623. DirAddDSAM                        (DirParamBlockPtr         paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x011D, 0xAA5E);
  4624.  
  4625. EXTERN_API( OSErr )
  4626. DirInstantiateDSAM                (DirParamBlockPtr         paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0127, 0xAA5E);
  4627.  
  4628.  
  4629. EXTERN_API( OSErr )
  4630. DirRemoveDSAM                    (DirParamBlockPtr         paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0120, 0xAA5E);
  4631.  
  4632. EXTERN_API( OSErr )
  4633. DirAddDSAMDirectory                (DirParamBlockPtr         paramBlock,
  4634.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0133, 0xAA5E);
  4635.  
  4636. EXTERN_API( OSErr )
  4637. DirGetExtendedDirectoriesInfo    (DirParamBlockPtr         paramBlock,
  4638.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0136, 0xAA5E);
  4639.  
  4640. EXTERN_API( OSErr )
  4641. DirGetDirectoryIcon                (DirParamBlockPtr         paramBlock,
  4642.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0121, 0xAA5E);
  4643.  
  4644.  
  4645. EXTERN_API( OSErr )
  4646. DirAddADAPDirectory                (DirParamBlockPtr         paramBlock,
  4647.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0137, 0xAA5E);
  4648.  
  4649. EXTERN_API( OSErr )
  4650. DirRemoveDirectory                (DirParamBlockPtr         paramBlock,
  4651.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0135, 0xAA5E);
  4652.  
  4653. EXTERN_API( OSErr )
  4654. DirNetSearchADAPDirectoriesGet    (DirParamBlockPtr         paramBlock,
  4655.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0108, 0xAA5E);
  4656.  
  4657. EXTERN_API( OSErr )
  4658. DirNetSearchADAPDirectoriesParse (DirParamBlockPtr         paramBlock,
  4659.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0105, 0xAA5E);
  4660.  
  4661. EXTERN_API( OSErr )
  4662. DirFindADAPDirectoryByNetSearch    (DirParamBlockPtr         paramBlock,
  4663.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0107, 0xAA5E);
  4664.  
  4665. EXTERN_API( OSErr )
  4666. DirGetOCESetupRefNum            (DirParamBlockPtr         paramBlock,
  4667.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0128, 0xAA5E);
  4668.  
  4669. EXTERN_API( OSErr )
  4670. DirAbort                        (DirParamBlockPtr         paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x011B, 0xAA5E);
  4671.  
  4672. EXTERN_API( OSErr )
  4673. OCESetupAddDirectoryInfo        (AuthParamBlockPtr         paramBlock,
  4674.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0219, 0xAA5E);
  4675.  
  4676. EXTERN_API( OSErr )
  4677. OCESetupChangeDirectoryInfo        (AuthParamBlockPtr         paramBlock,
  4678.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x021B, 0xAA5E);
  4679.  
  4680. EXTERN_API( OSErr )
  4681. OCESetupRemoveDirectoryInfo        (AuthParamBlockPtr         paramBlock,
  4682.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x020D, 0xAA5E);
  4683.  
  4684. EXTERN_API( OSErr )
  4685. OCESetupGetDirectoryInfo        (AuthParamBlockPtr         paramBlock,
  4686.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x020E, 0xAA5E);
  4687.  
  4688.  
  4689. #if PRAGMA_STRUCT_ALIGN
  4690.     #pragma options align=reset
  4691. #elif PRAGMA_STRUCT_PACKPUSH
  4692.     #pragma pack(pop)
  4693. #elif PRAGMA_STRUCT_PACK
  4694.     #pragma pack()
  4695. #endif
  4696.  
  4697. #ifdef PRAGMA_IMPORT_OFF
  4698. #pragma import off
  4699. #elif PRAGMA_IMPORT
  4700. #pragma import reset
  4701. #endif
  4702.  
  4703. #ifdef __cplusplus
  4704. }
  4705. #endif
  4706.  
  4707. #endif /* __OCEAUTHDIR__ */
  4708.  
  4709.